Class: MuxRuby::LiveStreamsApi
- Inherits:
-
Object
- Object
- MuxRuby::LiveStreamsApi
- Defined in:
- lib/mux_ruby/api/live_streams_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_live_stream(create_live_stream_request, opts = {}) ⇒ LiveStreamResponse
Create a live stream Creates a new live stream.
-
#create_live_stream_playback_id(live_stream_id, create_playback_id_request, opts = {}) ⇒ CreatePlaybackIDResponse
Create a live stream playback ID Create a new playback ID for this live stream, through which a viewer can watch the streamed content of the live stream.
-
#create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts = {}) ⇒ Array<(CreatePlaybackIDResponse, Integer, Hash)>
Create a live stream playback ID Create a new playback ID for this live stream, through which a viewer can watch the streamed content of the live stream.
-
#create_live_stream_simulcast_target(live_stream_id, create_simulcast_target_request, opts = {}) ⇒ SimulcastTargetResponse
Create a live stream simulcast target Create a simulcast target for the parent live stream.
-
#create_live_stream_simulcast_target_with_http_info(live_stream_id, create_simulcast_target_request, opts = {}) ⇒ Array<(SimulcastTargetResponse, Integer, Hash)>
Create a live stream simulcast target Create a simulcast target for the parent live stream.
-
#create_live_stream_with_http_info(create_live_stream_request, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Create a live stream Creates a new live stream.
-
#delete_live_stream(live_stream_id, opts = {}) ⇒ nil
Delete a live stream Deletes a live stream from the current environment.
-
#delete_live_stream_playback_id(live_stream_id, playback_id, opts = {}) ⇒ nil
Delete a live stream playback ID Deletes the playback ID for the live stream.
-
#delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a live stream playback ID Deletes the playback ID for the live stream.
-
#delete_live_stream_simulcast_target(live_stream_id, simulcast_target_id, opts = {}) ⇒ nil
Delete a live stream simulcast target Delete the simulcast target using the simulcast target ID returned when creating the simulcast target.
-
#delete_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a live stream simulcast target Delete the simulcast target using the simulcast target ID returned when creating the simulcast target.
-
#delete_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a live stream Deletes a live stream from the current environment.
-
#disable_live_stream(live_stream_id, opts = {}) ⇒ DisableLiveStreamResponse
Disable a live stream Disables a live stream, making it reject incoming RTMP streams until re-enabled.
-
#disable_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(DisableLiveStreamResponse, Integer, Hash)>
Disable a live stream Disables a live stream, making it reject incoming RTMP streams until re-enabled.
-
#enable_live_stream(live_stream_id, opts = {}) ⇒ EnableLiveStreamResponse
Enable a live stream Enables a live stream, allowing it to accept an incoming RTMP stream.
-
#enable_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(EnableLiveStreamResponse, Integer, Hash)>
Enable a live stream Enables a live stream, allowing it to accept an incoming RTMP stream.
-
#get_live_stream(live_stream_id, opts = {}) ⇒ LiveStreamResponse
Retrieve a live stream Retrieves the details of a live stream that has previously been created.
-
#get_live_stream_playback_id(live_stream_id, playback_id, opts = {}) ⇒ GetLiveStreamPlaybackIDResponse
Retrieve a live stream playback ID Fetches information about a live stream’s playback ID, through which a viewer can watch the streamed content from this live stream.
-
#get_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) ⇒ Array<(GetLiveStreamPlaybackIDResponse, Integer, Hash)>
Retrieve a live stream playback ID Fetches information about a live stream's playback ID, through which a viewer can watch the streamed content from this live stream.
-
#get_live_stream_simulcast_target(live_stream_id, simulcast_target_id, opts = {}) ⇒ SimulcastTargetResponse
Retrieve a live stream simulcast target Retrieves the details of the simulcast target created for the parent live stream.
-
#get_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id, opts = {}) ⇒ Array<(SimulcastTargetResponse, Integer, Hash)>
Retrieve a live stream simulcast target Retrieves the details of the simulcast target created for the parent live stream.
-
#get_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Retrieve a live stream Retrieves the details of a live stream that has previously been created.
-
#initialize(api_client = ApiClient.default) ⇒ LiveStreamsApi
constructor
A new instance of LiveStreamsApi.
-
#list_live_streams(opts = {}) ⇒ ListLiveStreamsResponse
List live streams Lists the live streams that currently exist in the current environment.
-
#list_live_streams_with_http_info(opts = {}) ⇒ Array<(ListLiveStreamsResponse, Integer, Hash)>
List live streams Lists the live streams that currently exist in the current environment.
-
#reset_stream_key(live_stream_id, opts = {}) ⇒ LiveStreamResponse
Reset a live stream’s stream key Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
-
#reset_stream_key_with_http_info(live_stream_id, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Reset a live stream's stream key Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
-
#signal_live_stream_complete(live_stream_id, opts = {}) ⇒ SignalLiveStreamCompleteResponse
Signal a live stream is finished (Optional) End the live stream recording immediately instead of waiting for the reconnect_window.
-
#signal_live_stream_complete_with_http_info(live_stream_id, opts = {}) ⇒ Array<(SignalLiveStreamCompleteResponse, Integer, Hash)>
Signal a live stream is finished (Optional) End the live stream recording immediately instead of waiting for the reconnect_window.
-
#update_live_stream(live_stream_id, update_live_stream_request, opts = {}) ⇒ LiveStreamResponse
Update a live stream Updates the parameters of a previously-created live stream.
-
#update_live_stream_embedded_subtitles(live_stream_id, update_live_stream_embedded_subtitles_request, opts = {}) ⇒ LiveStreamResponse
Update a live stream’s embedded subtitles Configures a live stream to receive embedded closed captions.
-
#update_live_stream_embedded_subtitles_with_http_info(live_stream_id, update_live_stream_embedded_subtitles_request, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Update a live stream's embedded subtitles Configures a live stream to receive embedded closed captions.
-
#update_live_stream_generated_subtitles(live_stream_id, update_live_stream_generated_subtitles_request, opts = {}) ⇒ LiveStreamResponse
Update a live stream’s generated subtitles Updates a live stream’s automatic-speech-recognition-generated subtitle configuration.
-
#update_live_stream_generated_subtitles_with_http_info(live_stream_id, update_live_stream_generated_subtitles_request, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Update a live stream's generated subtitles Updates a live stream's automatic-speech-recognition-generated subtitle configuration.
-
#update_live_stream_with_http_info(live_stream_id, update_live_stream_request, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Update a live stream Updates the parameters of a previously-created live stream.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LiveStreamsApi
Returns a new instance of LiveStreamsApi.
19 20 21 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_live_stream(create_live_stream_request, opts = {}) ⇒ LiveStreamResponse
Create a live stream Creates a new live stream. Once created, an encoder can connect to Mux via the specified stream key and begin streaming to an audience.
27 28 29 30 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 27 def create_live_stream(create_live_stream_request, opts = {}) data, _status_code, _headers = create_live_stream_with_http_info(create_live_stream_request, opts) data end |
#create_live_stream_playback_id(live_stream_id, create_playback_id_request, opts = {}) ⇒ CreatePlaybackIDResponse
Create a live stream playback ID Create a new playback ID for this live stream, through which a viewer can watch the streamed content of the live stream.
93 94 95 96 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 93 def create_live_stream_playback_id(live_stream_id, create_playback_id_request, opts = {}) data, _status_code, _headers = create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts) data end |
#create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts = {}) ⇒ Array<(CreatePlaybackIDResponse, Integer, Hash)>
Create a live stream playback ID Create a new playback ID for this live stream, through which a viewer can watch the streamed content of the live stream.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 104 def create_live_stream_playback_id_with_http_info(live_stream_id, create_playback_id_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.create_live_stream_playback_id ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.create_live_stream_playback_id" end # verify the required parameter 'create_playback_id_request' is set if @api_client.config.client_side_validation && create_playback_id_request.nil? fail ArgumentError, "Missing the required parameter 'create_playback_id_request' when calling LiveStreamsApi.create_live_stream_playback_id" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_playback_id_request) # return_type return_type = opts[:debug_return_type] || 'CreatePlaybackIDResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.create_live_stream_playback_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#create_live_stream_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_live_stream_simulcast_target(live_stream_id, create_simulcast_target_request, opts = {}) ⇒ SimulcastTargetResponse
Create a live stream simulcast target Create a simulcast target for the parent live stream. Simulcast target can only be created when the parent live stream is in idle state. Only one simulcast target can be created at a time with this API.
164 165 166 167 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 164 def create_live_stream_simulcast_target(live_stream_id, create_simulcast_target_request, opts = {}) data, _status_code, _headers = create_live_stream_simulcast_target_with_http_info(live_stream_id, create_simulcast_target_request, opts) data end |
#create_live_stream_simulcast_target_with_http_info(live_stream_id, create_simulcast_target_request, opts = {}) ⇒ Array<(SimulcastTargetResponse, Integer, Hash)>
Create a live stream simulcast target Create a simulcast target for the parent live stream. Simulcast target can only be created when the parent live stream is in idle state. Only one simulcast target can be created at a time with this API.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 175 def create_live_stream_simulcast_target_with_http_info(live_stream_id, create_simulcast_target_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.create_live_stream_simulcast_target ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.create_live_stream_simulcast_target" end # verify the required parameter 'create_simulcast_target_request' is set if @api_client.config.client_side_validation && create_simulcast_target_request.nil? fail ArgumentError, "Missing the required parameter 'create_simulcast_target_request' when calling LiveStreamsApi.create_live_stream_simulcast_target" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_simulcast_target_request) # return_type return_type = opts[:debug_return_type] || 'SimulcastTargetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.create_live_stream_simulcast_target", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#create_live_stream_simulcast_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_live_stream_with_http_info(create_live_stream_request, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Create a live stream Creates a new live stream. Once created, an encoder can connect to Mux via the specified stream key and begin streaming to an audience.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 37 def create_live_stream_with_http_info(create_live_stream_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.create_live_stream ...' end # verify the required parameter 'create_live_stream_request' is set if @api_client.config.client_side_validation && create_live_stream_request.nil? fail ArgumentError, "Missing the required parameter 'create_live_stream_request' when calling LiveStreamsApi.create_live_stream" end # resource path local_var_path = '/video/v1/live-streams' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_live_stream_request) # return_type return_type = opts[:debug_return_type] || 'LiveStreamResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.create_live_stream", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#create_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_live_stream(live_stream_id, opts = {}) ⇒ nil
Delete a live stream Deletes a live stream from the current environment. If the live stream is currently active and being streamed to, ingest will be terminated and the encoder will be disconnected.
234 235 236 237 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 234 def delete_live_stream(live_stream_id, opts = {}) delete_live_stream_with_http_info(live_stream_id, opts) nil end |
#delete_live_stream_playback_id(live_stream_id, playback_id, opts = {}) ⇒ nil
Delete a live stream playback ID Deletes the playback ID for the live stream. This will not disable ingest (as the live stream still exists). New attempts to play back the live stream will fail immediately. However, current viewers will be able to continue watching the stream for some period of time.
296 297 298 299 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 296 def delete_live_stream_playback_id(live_stream_id, playback_id, opts = {}) delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts) nil end |
#delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a live stream playback ID Deletes the playback ID for the live stream. This will not disable ingest (as the live stream still exists). New attempts to play back the live stream will fail immediately. However, current viewers will be able to continue watching the stream for some period of time.
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 307 def delete_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.delete_live_stream_playback_id ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.delete_live_stream_playback_id" end # verify the required parameter 'playback_id' is set if @api_client.config.client_side_validation && playback_id.nil? fail ArgumentError, "Missing the required parameter 'playback_id' when calling LiveStreamsApi.delete_live_stream_playback_id" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)).sub('{' + 'PLAYBACK_ID' + '}', CGI.escape(playback_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.delete_live_stream_playback_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#delete_live_stream_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_live_stream_simulcast_target(live_stream_id, simulcast_target_id, opts = {}) ⇒ nil
Delete a live stream simulcast target Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state.
363 364 365 366 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 363 def delete_live_stream_simulcast_target(live_stream_id, simulcast_target_id, opts = {}) delete_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id, opts) nil end |
#delete_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a live stream simulcast target Delete the simulcast target using the simulcast target ID returned when creating the simulcast target. Simulcast Target can only be deleted when the parent live stream is in idle state.
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 374 def delete_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.delete_live_stream_simulcast_target ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.delete_live_stream_simulcast_target" end # verify the required parameter 'simulcast_target_id' is set if @api_client.config.client_side_validation && simulcast_target_id.nil? fail ArgumentError, "Missing the required parameter 'simulcast_target_id' when calling LiveStreamsApi.delete_live_stream_simulcast_target" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)).sub('{' + 'SIMULCAST_TARGET_ID' + '}', CGI.escape(simulcast_target_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.delete_live_stream_simulcast_target", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#delete_live_stream_simulcast_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a live stream Deletes a live stream from the current environment. If the live stream is currently active and being streamed to, ingest will be terminated and the encoder will be disconnected.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 244 def delete_live_stream_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.delete_live_stream ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.delete_live_stream" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.delete_live_stream", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#delete_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#disable_live_stream(live_stream_id, opts = {}) ⇒ DisableLiveStreamResponse
Disable a live stream Disables a live stream, making it reject incoming RTMP streams until re-enabled. The API also ends the live stream recording immediately when active. Ending the live stream recording adds the ‘EXT-X-ENDLIST` tag to the HLS manifest which notifies the player that this live stream is over. Mux also closes the encoder connection immediately. Any attempt from the encoder to re-establish connection will fail till the live stream is re-enabled.
429 430 431 432 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 429 def disable_live_stream(live_stream_id, opts = {}) data, _status_code, _headers = disable_live_stream_with_http_info(live_stream_id, opts) data end |
#disable_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(DisableLiveStreamResponse, Integer, Hash)>
Disable a live stream Disables a live stream, making it reject incoming RTMP streams until re-enabled. The API also ends the live stream recording immediately when active. Ending the live stream recording adds the `EXT-X-ENDLIST` tag to the HLS manifest which notifies the player that this live stream is over. Mux also closes the encoder connection immediately. Any attempt from the encoder to re-establish connection will fail till the live stream is re-enabled.
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 439 def disable_live_stream_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.disable_live_stream ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.disable_live_stream" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/disable'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DisableLiveStreamResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.disable_live_stream", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#disable_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#enable_live_stream(live_stream_id, opts = {}) ⇒ EnableLiveStreamResponse
Enable a live stream Enables a live stream, allowing it to accept an incoming RTMP stream.
492 493 494 495 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 492 def enable_live_stream(live_stream_id, opts = {}) data, _status_code, _headers = enable_live_stream_with_http_info(live_stream_id, opts) data end |
#enable_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(EnableLiveStreamResponse, Integer, Hash)>
Enable a live stream Enables a live stream, allowing it to accept an incoming RTMP stream.
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 502 def enable_live_stream_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.enable_live_stream ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.enable_live_stream" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/enable'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EnableLiveStreamResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.enable_live_stream", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#enable_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_live_stream(live_stream_id, opts = {}) ⇒ LiveStreamResponse
Retrieve a live stream Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream.
555 556 557 558 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 555 def get_live_stream(live_stream_id, opts = {}) data, _status_code, _headers = get_live_stream_with_http_info(live_stream_id, opts) data end |
#get_live_stream_playback_id(live_stream_id, playback_id, opts = {}) ⇒ GetLiveStreamPlaybackIDResponse
Retrieve a live stream playback ID Fetches information about a live stream’s playback ID, through which a viewer can watch the streamed content from this live stream.
619 620 621 622 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 619 def get_live_stream_playback_id(live_stream_id, playback_id, opts = {}) data, _status_code, _headers = get_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts) data end |
#get_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) ⇒ Array<(GetLiveStreamPlaybackIDResponse, Integer, Hash)>
Retrieve a live stream playback ID Fetches information about a live stream's playback ID, through which a viewer can watch the streamed content from this live stream.
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 630 def get_live_stream_playback_id_with_http_info(live_stream_id, playback_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.get_live_stream_playback_id ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.get_live_stream_playback_id" end # verify the required parameter 'playback_id' is set if @api_client.config.client_side_validation && playback_id.nil? fail ArgumentError, "Missing the required parameter 'playback_id' when calling LiveStreamsApi.get_live_stream_playback_id" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/playback-ids/{PLAYBACK_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)).sub('{' + 'PLAYBACK_ID' + '}', CGI.escape(playback_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetLiveStreamPlaybackIDResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.get_live_stream_playback_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#get_live_stream_playback_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_live_stream_simulcast_target(live_stream_id, simulcast_target_id, opts = {}) ⇒ SimulcastTargetResponse
Retrieve a live stream simulcast target Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information.
688 689 690 691 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 688 def get_live_stream_simulcast_target(live_stream_id, simulcast_target_id, opts = {}) data, _status_code, _headers = get_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id, opts) data end |
#get_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id, opts = {}) ⇒ Array<(SimulcastTargetResponse, Integer, Hash)>
Retrieve a live stream simulcast target Retrieves the details of the simulcast target created for the parent live stream. Supply the unique live stream ID and simulcast target ID that was returned in the response of create simulcast target request, and Mux will return the corresponding information.
699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 699 def get_live_stream_simulcast_target_with_http_info(live_stream_id, simulcast_target_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.get_live_stream_simulcast_target ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.get_live_stream_simulcast_target" end # verify the required parameter 'simulcast_target_id' is set if @api_client.config.client_side_validation && simulcast_target_id.nil? fail ArgumentError, "Missing the required parameter 'simulcast_target_id' when calling LiveStreamsApi.get_live_stream_simulcast_target" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/simulcast-targets/{SIMULCAST_TARGET_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)).sub('{' + 'SIMULCAST_TARGET_ID' + '}', CGI.escape(simulcast_target_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SimulcastTargetResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.get_live_stream_simulcast_target", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#get_live_stream_simulcast_target\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_live_stream_with_http_info(live_stream_id, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Retrieve a live stream Retrieves the details of a live stream that has previously been created. Supply the unique live stream ID that was returned from your previous request, and Mux will return the corresponding live stream information. The same information is returned when creating a live stream.
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 565 def get_live_stream_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.get_live_stream ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.get_live_stream" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'LiveStreamResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.get_live_stream", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#get_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_live_streams(opts = {}) ⇒ ListLiveStreamsResponse
List live streams Lists the live streams that currently exist in the current environment.
759 760 761 762 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 759 def list_live_streams(opts = {}) data, _status_code, _headers = list_live_streams_with_http_info(opts) data end |
#list_live_streams_with_http_info(opts = {}) ⇒ Array<(ListLiveStreamsResponse, Integer, Hash)>
List live streams Lists the live streams that currently exist in the current environment.
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 772 def list_live_streams_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.list_live_streams ...' end # resource path local_var_path = '/video/v1/live-streams' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'stream_key'] = opts[:'stream_key'] if !opts[:'stream_key'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListLiveStreamsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.list_live_streams", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#list_live_streams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reset_stream_key(live_stream_id, opts = {}) ⇒ LiveStreamResponse
Reset a live stream’s stream key Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
825 826 827 828 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 825 def reset_stream_key(live_stream_id, opts = {}) data, _status_code, _headers = reset_stream_key_with_http_info(live_stream_id, opts) data end |
#reset_stream_key_with_http_info(live_stream_id, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Reset a live stream's stream key Reset a live stream key if you want to immediately stop the current stream key from working and create a new stream key that can be used for future broadcasts.
835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 835 def reset_stream_key_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.reset_stream_key ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.reset_stream_key" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/reset-stream-key'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'LiveStreamResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.reset_stream_key", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#reset_stream_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#signal_live_stream_complete(live_stream_id, opts = {}) ⇒ SignalLiveStreamCompleteResponse
Signal a live stream is finished (Optional) End the live stream recording immediately instead of waiting for the reconnect_window. ‘EXT-X-ENDLIST` tag is added to the HLS manifest which notifies the player that this live stream is over. Mux does not close the encoder connection immediately. Encoders are often configured to re-establish connections immediately which would result in a new recorded asset. For this reason, Mux waits for 60s before closing the connection with the encoder. This 60s timeframe is meant to give encoder operators a chance to disconnect from their end.
888 889 890 891 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 888 def signal_live_stream_complete(live_stream_id, opts = {}) data, _status_code, _headers = signal_live_stream_complete_with_http_info(live_stream_id, opts) data end |
#signal_live_stream_complete_with_http_info(live_stream_id, opts = {}) ⇒ Array<(SignalLiveStreamCompleteResponse, Integer, Hash)>
Signal a live stream is finished (Optional) End the live stream recording immediately instead of waiting for the reconnect_window. `EXT-X-ENDLIST` tag is added to the HLS manifest which notifies the player that this live stream is over. Mux does not close the encoder connection immediately. Encoders are often configured to re-establish connections immediately which would result in a new recorded asset. For this reason, Mux waits for 60s before closing the connection with the encoder. This 60s timeframe is meant to give encoder operators a chance to disconnect from their end.
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 898 def signal_live_stream_complete_with_http_info(live_stream_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.signal_live_stream_complete ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.signal_live_stream_complete" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/complete'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SignalLiveStreamCompleteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.signal_live_stream_complete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#signal_live_stream_complete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_live_stream(live_stream_id, update_live_stream_request, opts = {}) ⇒ LiveStreamResponse
Update a live stream Updates the parameters of a previously-created live stream. This currently supports a subset of variables. Supply the live stream ID and the updated parameters and Mux will return the corresponding live stream information. The information returned will be the same after update as for subsequent get live stream requests.
952 953 954 955 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 952 def update_live_stream(live_stream_id, update_live_stream_request, opts = {}) data, _status_code, _headers = update_live_stream_with_http_info(live_stream_id, update_live_stream_request, opts) data end |
#update_live_stream_embedded_subtitles(live_stream_id, update_live_stream_embedded_subtitles_request, opts = {}) ⇒ LiveStreamResponse
Update a live stream’s embedded subtitles Configures a live stream to receive embedded closed captions. The resulting Asset’s subtitle text track will have ‘closed_captions: true` set.
1023 1024 1025 1026 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 1023 def (live_stream_id, , opts = {}) data, _status_code, _headers = (live_stream_id, , opts) data end |
#update_live_stream_embedded_subtitles_with_http_info(live_stream_id, update_live_stream_embedded_subtitles_request, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Update a live stream's embedded subtitles Configures a live stream to receive embedded closed captions. The resulting Asset's subtitle text track will have `closed_captions: true` set.
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 1034 def (live_stream_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.update_live_stream_embedded_subtitles ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.update_live_stream_embedded_subtitles" end # verify the required parameter 'update_live_stream_embedded_subtitles_request' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'update_live_stream_embedded_subtitles_request' when calling LiveStreamsApi.update_live_stream_embedded_subtitles" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/embedded-subtitles'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body() # return_type return_type = opts[:debug_return_type] || 'LiveStreamResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.update_live_stream_embedded_subtitles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#update_live_stream_embedded_subtitles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_live_stream_generated_subtitles(live_stream_id, update_live_stream_generated_subtitles_request, opts = {}) ⇒ LiveStreamResponse
Update a live stream’s generated subtitles Updates a live stream’s automatic-speech-recognition-generated subtitle configuration. Automatic speech recognition subtitles can be removed by sending an empty array in the request payload.
1094 1095 1096 1097 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 1094 def update_live_stream_generated_subtitles(live_stream_id, update_live_stream_generated_subtitles_request, opts = {}) data, _status_code, _headers = update_live_stream_generated_subtitles_with_http_info(live_stream_id, update_live_stream_generated_subtitles_request, opts) data end |
#update_live_stream_generated_subtitles_with_http_info(live_stream_id, update_live_stream_generated_subtitles_request, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Update a live stream's generated subtitles Updates a live stream's automatic-speech-recognition-generated subtitle configuration. Automatic speech recognition subtitles can be removed by sending an empty array in the request payload.
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 1105 def update_live_stream_generated_subtitles_with_http_info(live_stream_id, update_live_stream_generated_subtitles_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.update_live_stream_generated_subtitles ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.update_live_stream_generated_subtitles" end # verify the required parameter 'update_live_stream_generated_subtitles_request' is set if @api_client.config.client_side_validation && update_live_stream_generated_subtitles_request.nil? fail ArgumentError, "Missing the required parameter 'update_live_stream_generated_subtitles_request' when calling LiveStreamsApi.update_live_stream_generated_subtitles" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}/generated-subtitles'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_live_stream_generated_subtitles_request) # return_type return_type = opts[:debug_return_type] || 'LiveStreamResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.update_live_stream_generated_subtitles", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#update_live_stream_generated_subtitles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_live_stream_with_http_info(live_stream_id, update_live_stream_request, opts = {}) ⇒ Array<(LiveStreamResponse, Integer, Hash)>
Update a live stream Updates the parameters of a previously-created live stream. This currently supports a subset of variables. Supply the live stream ID and the updated parameters and Mux will return the corresponding live stream information. The information returned will be the same after update as for subsequent get live stream requests.
963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 |
# File 'lib/mux_ruby/api/live_streams_api.rb', line 963 def update_live_stream_with_http_info(live_stream_id, update_live_stream_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LiveStreamsApi.update_live_stream ...' end # verify the required parameter 'live_stream_id' is set if @api_client.config.client_side_validation && live_stream_id.nil? fail ArgumentError, "Missing the required parameter 'live_stream_id' when calling LiveStreamsApi.update_live_stream" end # verify the required parameter 'update_live_stream_request' is set if @api_client.config.client_side_validation && update_live_stream_request.nil? fail ArgumentError, "Missing the required parameter 'update_live_stream_request' when calling LiveStreamsApi.update_live_stream" end # resource path local_var_path = '/video/v1/live-streams/{LIVE_STREAM_ID}'.sub('{' + 'LIVE_STREAM_ID' + '}', CGI.escape(live_stream_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_live_stream_request) # return_type return_type = opts[:debug_return_type] || 'LiveStreamResponse' # auth_names auth_names = opts[:debug_auth_names] || ['accessToken'] = opts.merge( :operation => :"LiveStreamsApi.update_live_stream", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LiveStreamsApi#update_live_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |