class Kaltura::KalturaLiveStreamService

Live Stream service lets you manage live stream entries

Public Class Methods

new(client) click to toggle source
Calls superclass method
# File lib/kaltura_client.rb, line 2464
def initialize(client)
        super(client)
end

Public Instance Methods

add(live_stream_entry, source_type=KalturaNotImplemented) click to toggle source

Adds new live stream entry.

The entry will be queued for provision.

@return [KalturaLiveStreamEntry]

# File lib/kaltura_client.rb, line 2471
def add(live_stream_entry, source_type=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'liveStreamEntry', live_stream_entry)
        client.add_param(kparams, 'sourceType', source_type)
        client.queue_service_action_call('livestream', 'add', 'KalturaLiveStreamEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
add_live_stream_push_publish_configuration(entry_id, protocol, url=KalturaNotImplemented, live_stream_configuration=KalturaNotImplemented) click to toggle source

Add new pushPublish configuration to entry @return [KalturaLiveStreamEntry]

# File lib/kaltura_client.rb, line 2484
def add_live_stream_push_publish_configuration(entry_id, protocol, url=KalturaNotImplemented, live_stream_configuration=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'protocol', protocol)
        client.add_param(kparams, 'url', url)
        client.add_param(kparams, 'liveStreamConfiguration', live_stream_configuration)
        client.queue_service_action_call('livestream', 'addLiveStreamPushPublishConfiguration', 'KalturaLiveStreamEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
allocate_conference_room(entry_id, env='') click to toggle source

Allocates a conference room or returns ones that has already been allocated @return [KalturaRoomDetails]

# File lib/kaltura_client.rb, line 2499
def allocate_conference_room(entry_id, env='')
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'env', env)
        client.queue_service_action_call('livestream', 'allocateConferenceRoom', 'KalturaRoomDetails', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
append_recording(entry_id, asset_id, media_server_index, resource, duration, is_last_chunk=false) click to toggle source

Append recorded video to live entry @return [KalturaLiveEntry]

# File lib/kaltura_client.rb, line 2512
def append_recording(entry_id, asset_id, media_server_index, resource, duration, is_last_chunk=false)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'assetId', asset_id)
        client.add_param(kparams, 'mediaServerIndex', media_server_index)
        client.add_param(kparams, 'resource', resource)
        client.add_param(kparams, 'duration', duration)
        client.add_param(kparams, 'isLastChunk', is_last_chunk)
        client.queue_service_action_call('livestream', 'appendRecording', 'KalturaLiveEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
archive(live_entry_id, vod_entry_id) click to toggle source

Archive a live entry which was recorded @return [bool]

# File lib/kaltura_client.rb, line 2529
def archive(live_entry_id, vod_entry_id)
        kparams = {}
        client.add_param(kparams, 'liveEntryId', live_entry_id)
        client.add_param(kparams, 'vodEntryId', vod_entry_id)
        client.queue_service_action_call('livestream', 'archive', 'bool', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
authenticate(entry_id, token, hostname=KalturaNotImplemented, media_server_index=KalturaNotImplemented, application_name=KalturaNotImplemented) click to toggle source

Authenticate live-stream entry against stream token and partner limitations @return [KalturaLiveStreamEntry]

# File lib/kaltura_client.rb, line 2542
def authenticate(entry_id, token, hostname=KalturaNotImplemented, media_server_index=KalturaNotImplemented, application_name=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'token', token)
        client.add_param(kparams, 'hostname', hostname)
        client.add_param(kparams, 'mediaServerIndex', media_server_index)
        client.add_param(kparams, 'applicationName', application_name)
        client.queue_service_action_call('livestream', 'authenticate', 'KalturaLiveStreamEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
create_periodic_sync_points(entry_id, interval, duration) click to toggle source

Creates periodic metadata sync-point events on a live stream @return []

# File lib/kaltura_client.rb, line 2558
def create_periodic_sync_points(entry_id, interval, duration)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'interval', interval)
        client.add_param(kparams, 'duration', duration)
        client.queue_service_action_call('livestream', 'createPeriodicSyncPoints', '', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
create_recorded_entry(entry_id, media_server_index, live_entry_status) click to toggle source

Create recorded entry id if it doesn't exist and make sure it happens on the DC that the live entry was created on. @return [KalturaLiveEntry]

# File lib/kaltura_client.rb, line 2572
def create_recorded_entry(entry_id, media_server_index, live_entry_status)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'mediaServerIndex', media_server_index)
        client.add_param(kparams, 'liveEntryStatus', live_entry_status)
        client.queue_service_action_call('livestream', 'createRecordedEntry', 'KalturaLiveEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
delete(entry_id) click to toggle source

Delete a live stream entry. @return []

# File lib/kaltura_client.rb, line 2586
def delete(entry_id)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.queue_service_action_call('livestream', 'delete', '', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
finish_conf(entry_id, server_node_id=KalturaNotImplemented) click to toggle source

When the conf is finished this API should be called. @return [bool]

# File lib/kaltura_client.rb, line 2598
def finish_conf(entry_id, server_node_id=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'serverNodeId', server_node_id)
        client.queue_service_action_call('livestream', 'finishConf', 'bool', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
get(entry_id, version=-1) click to toggle source

Get live stream entry by ID. @return [KalturaLiveStreamEntry]

# File lib/kaltura_client.rb, line 2611
def get(entry_id, version=-1)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'version', version)
        client.queue_service_action_call('livestream', 'get', 'KalturaLiveStreamEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
get_details(id) click to toggle source

Delivering the status of a live stream (on-air/offline) if it is possible @return [KalturaLiveStreamDetails]

# File lib/kaltura_client.rb, line 2624
def get_details(id)
        kparams = {}
        client.add_param(kparams, 'id', id)
        client.queue_service_action_call('livestream', 'getDetails', 'KalturaLiveStreamDetails', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
is_live(id, protocol=KalturaNotImplemented) click to toggle source

Delivering the status of a live stream (on-air/offline) if it is possible @return [bool]

# File lib/kaltura_client.rb, line 2636
def is_live(id, protocol=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'id', id)
        client.add_param(kparams, 'protocol', protocol)
        client.queue_service_action_call('livestream', 'isLive', 'bool', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) click to toggle source

List live stream entries by filter with paging support. @return [KalturaLiveStreamListResponse]

# File lib/kaltura_client.rb, line 2649
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'filter', filter)
        client.add_param(kparams, 'pager', pager)
        client.queue_service_action_call('livestream', 'list', 'KalturaLiveStreamListResponse', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
regenerate_stream_token(entry_id) click to toggle source

Regenerate new secure token for liveStream @return [KalturaLiveEntry]

# File lib/kaltura_client.rb, line 2662
def regenerate_stream_token(entry_id)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.queue_service_action_call('livestream', 'regenerateStreamToken', 'KalturaLiveEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
register_conf(entry_id) click to toggle source

Mark that the conference has actually started @return [bool]

# File lib/kaltura_client.rb, line 2674
def register_conf(entry_id)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.queue_service_action_call('livestream', 'registerConf', 'bool', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
register_media_server(entry_id, hostname, media_server_index, application_name=KalturaNotImplemented, live_entry_status=1, should_create_recorded_entry=true) click to toggle source

Register media server to live entry @return [KalturaLiveEntry]

# File lib/kaltura_client.rb, line 2686
def register_media_server(entry_id, hostname, media_server_index, application_name=KalturaNotImplemented, live_entry_status=1, should_create_recorded_entry=true)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'hostname', hostname)
        client.add_param(kparams, 'mediaServerIndex', media_server_index)
        client.add_param(kparams, 'applicationName', application_name)
        client.add_param(kparams, 'liveEntryStatus', live_entry_status)
        client.add_param(kparams, 'shouldCreateRecordedEntry', should_create_recorded_entry)
        client.queue_service_action_call('livestream', 'registerMediaServer', 'KalturaLiveEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
remove_live_stream_push_publish_configuration(entry_id, protocol) click to toggle source

Remove push publish configuration from entry @return [KalturaLiveStreamEntry]

# File lib/kaltura_client.rb, line 2703
def remove_live_stream_push_publish_configuration(entry_id, protocol)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'protocol', protocol)
        client.queue_service_action_call('livestream', 'removeLiveStreamPushPublishConfiguration', 'KalturaLiveStreamEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
set_recorded_content(entry_id, media_server_index, resource, duration, recorded_entry_id=KalturaNotImplemented, flavor_params_id=KalturaNotImplemented) click to toggle source

Set recorded video to live entry @return [KalturaLiveEntry]

# File lib/kaltura_client.rb, line 2716
def set_recorded_content(entry_id, media_server_index, resource, duration, recorded_entry_id=KalturaNotImplemented, flavor_params_id=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'mediaServerIndex', media_server_index)
        client.add_param(kparams, 'resource', resource)
        client.add_param(kparams, 'duration', duration)
        client.add_param(kparams, 'recordedEntryId', recorded_entry_id)
        client.add_param(kparams, 'flavorParamsId', flavor_params_id)
        client.queue_service_action_call('livestream', 'setRecordedContent', 'KalturaLiveEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
unregister_media_server(entry_id, hostname, media_server_index) click to toggle source

Unregister media server from live entry @return [KalturaLiveEntry]

# File lib/kaltura_client.rb, line 2733
def unregister_media_server(entry_id, hostname, media_server_index)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'hostname', hostname)
        client.add_param(kparams, 'mediaServerIndex', media_server_index)
        client.queue_service_action_call('livestream', 'unregisterMediaServer', 'KalturaLiveEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
update(entry_id, live_stream_entry) click to toggle source

Update live stream entry. Only the properties that were set will be updated. @return [KalturaLiveStreamEntry]

# File lib/kaltura_client.rb, line 2747
def update(entry_id, live_stream_entry)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'liveStreamEntry', live_stream_entry)
        client.queue_service_action_call('livestream', 'update', 'KalturaLiveStreamEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
update_offline_thumbnail_from_url(entry_id, url) click to toggle source

Update entry thumbnail using url @return [KalturaLiveStreamEntry]

# File lib/kaltura_client.rb, line 2760
def update_offline_thumbnail_from_url(entry_id, url)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'url', url)
        client.queue_service_action_call('livestream', 'updateOfflineThumbnailFromUrl', 'KalturaLiveStreamEntry', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
update_offline_thumbnail_jpeg(entry_id, file_data) click to toggle source

Update live stream entry thumbnail using a raw jpeg file @return [KalturaLiveStreamEntry]

# File lib/kaltura_client.rb, line 2773
def update_offline_thumbnail_jpeg(entry_id, file_data)
        kparams = {}
        kfiles = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kfiles, 'fileData', file_data)
        client.queue_service_action_call('livestream', 'updateOfflineThumbnailJpeg', 'KalturaLiveStreamEntry', kparams, kfiles)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
validate_registered_media_servers(entry_id) click to toggle source

Validates all registered media servers @return []

# File lib/kaltura_client.rb, line 2787
def validate_registered_media_servers(entry_id)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.queue_service_action_call('livestream', 'validateRegisteredMediaServers', '', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end