class MuxRuby::LiveStreamsApi
Attributes
Public Class Methods
# File lib/mux_ruby/api/live_streams_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create a live stream @param create_live_stream_request [CreateLiveStreamRequest] @param [Hash] opts the optional parameters @return [LiveStreamResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 26 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 a live stream playback ID @param live_stream_id [String] The live stream ID @param create_playback_id_request [CreatePlaybackIDRequest] @param [Hash] opts the optional parameters @return [CreatePlaybackIDResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 90 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 a live stream playback ID @param live_stream_id [String] The live stream ID @param create_playback_id_request [CreatePlaybackIDRequest] @param [Hash] opts the optional parameters @return [Array<(CreatePlaybackIDResponse
, Integer, Hash)>] CreatePlaybackIDResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 100 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'] new_options = 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, new_options) 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 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. @param live_stream_id [String] The live stream ID @param create_simulcast_target_request [CreateSimulcastTargetRequest] @param [Hash] opts the optional parameters @return [SimulcastTargetResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 160 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 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. @param live_stream_id [String] The live stream ID @param create_simulcast_target_request [CreateSimulcastTargetRequest] @param [Hash] opts the optional parameters @return [Array<(SimulcastTargetResponse
, Integer, Hash)>] SimulcastTargetResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 171 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'] new_options = 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, new_options) 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 a live stream @param create_live_stream_request [CreateLiveStreamRequest] @param [Hash] opts the optional parameters @return [Array<(LiveStreamResponse
, Integer, Hash)>] LiveStreamResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 35 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'] new_options = 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, new_options) 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 a live stream @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [nil]
# File lib/mux_ruby/api/live_streams_api.rb, line 229 def delete_live_stream(live_stream_id, opts = {}) delete_live_stream_with_http_info(live_stream_id, opts) nil end
Delete a live stream playback ID @param live_stream_id [String] The live stream ID @param playback_id [String] The live stream's playback ID. @param [Hash] opts the optional parameters @return [nil]
# File lib/mux_ruby/api/live_streams_api.rb, line 289 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 a live stream playback ID @param live_stream_id [String] The live stream ID @param playback_id [String] The live stream's playback ID. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 299 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'] new_options = 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, new_options) 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 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. @param live_stream_id [String] The live stream ID @param simulcast_target_id [String] The ID of the simulcast target. @param [Hash] opts the optional parameters @return [nil]
# File lib/mux_ruby/api/live_streams_api.rb, line 355 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 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. @param live_stream_id [String] The live stream ID @param simulcast_target_id [String] The ID of the simulcast target. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 366 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'] new_options = 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, new_options) 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 a live stream @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 238 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'] new_options = 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, new_options) 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 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. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [DisableLiveStreamResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 421 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 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. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [Array<(DisableLiveStreamResponse
, Integer, Hash)>] DisableLiveStreamResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 431 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'] new_options = 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, new_options) 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 a live stream Enables a live stream, allowing it to accept an incoming RTMP stream. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [EnableLiveStreamResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 484 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 a live stream Enables a live stream, allowing it to accept an incoming RTMP stream. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [Array<(EnableLiveStreamResponse
, Integer, Hash)>] EnableLiveStreamResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 494 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'] new_options = 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, new_options) 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
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. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [LiveStreamResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 547 def get_live_stream(live_stream_id, opts = {}) data, _status_code, _headers = get_live_stream_with_http_info(live_stream_id, opts) data end
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. @param live_stream_id [String] The live stream ID @param simulcast_target_id [String] The ID of the simulcast target. @param [Hash] opts the optional parameters @return [SimulcastTargetResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 611 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
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. @param live_stream_id [String] The live stream ID @param simulcast_target_id [String] The ID of the simulcast target. @param [Hash] opts the optional parameters @return [Array<(SimulcastTargetResponse
, Integer, Hash)>] SimulcastTargetResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 622 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'] new_options = 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, new_options) 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
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. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [Array<(LiveStreamResponse
, Integer, Hash)>] LiveStreamResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 557 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'] new_options = 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, new_options) 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 @param [Hash] opts the optional parameters @option opts [Integer] :limit Number of items to include in the response (default to 25) @option opts [Integer] :page Offset by this many pages, of the size of `limit` (default to 1) @option opts [String] :stream_key Filter response to return live stream for this stream key only @return [ListLiveStreamsResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 680 def list_live_streams(opts = {}) data, _status_code, _headers = list_live_streams_with_http_info(opts) data end
List live streams @param [Hash] opts the optional parameters @option opts [Integer] :limit Number of items to include in the response @option opts [Integer] :page Offset by this many pages, of the size of `limit` @option opts [String] :stream_key Filter response to return live stream for this stream key only @return [Array<(ListLiveStreamsResponse
, Integer, Hash)>] ListLiveStreamsResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 691 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? # 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'] new_options = 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, new_options) 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 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. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [LiveStreamResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 743 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 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. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [Array<(LiveStreamResponse
, Integer, Hash)>] LiveStreamResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 753 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'] new_options = 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, new_options) 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 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. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [SignalLiveStreamCompleteResponse]
# File lib/mux_ruby/api/live_streams_api.rb, line 806 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 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. @param live_stream_id [String] The live stream ID @param [Hash] opts the optional parameters @return [Array<(SignalLiveStreamCompleteResponse
, Integer, Hash)>] SignalLiveStreamCompleteResponse
data, response status code and response headers
# File lib/mux_ruby/api/live_streams_api.rb, line 816 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'] new_options = 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, new_options) 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