class Kaltura::KalturaCaptionAssetService

Retrieve information and invoke actions on caption Asset

Public Class Methods

new(client) click to toggle source
Calls superclass method Kaltura::KalturaServiceBase::new
# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 419
def initialize(client)
        super(client)
end

Public Instance Methods

add(entry_id, caption_asset) click to toggle source

Add caption asset @return [KalturaCaptionAsset]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 425
def add(entry_id, caption_asset)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'captionAsset', caption_asset)
        client.queue_service_action_call('caption_captionasset', 'add', 'KalturaCaptionAsset', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
delete(caption_asset_id) click to toggle source

@return []

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 437
def delete(caption_asset_id)
        kparams = {}
        client.add_param(kparams, 'captionAssetId', caption_asset_id)
        client.queue_service_action_call('caption_captionasset', 'delete', '', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
export(asset_id, storage_profile_id) click to toggle source

manually export an asset @return [KalturaFlavorAsset]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 449
def export(asset_id, storage_profile_id)
        kparams = {}
        client.add_param(kparams, 'assetId', asset_id)
        client.add_param(kparams, 'storageProfileId', storage_profile_id)
        client.queue_service_action_call('caption_captionasset', 'export', 'KalturaFlavorAsset', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
get(caption_asset_id) click to toggle source

@return [KalturaCaptionAsset]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 461
def get(caption_asset_id)
        kparams = {}
        client.add_param(kparams, 'captionAssetId', caption_asset_id)
        client.queue_service_action_call('caption_captionasset', 'get', 'KalturaCaptionAsset', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
get_remote_paths(id) click to toggle source

Get remote storage existing paths for the asset @return [KalturaRemotePathListResponse]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 473
def get_remote_paths(id)
        kparams = {}
        client.add_param(kparams, 'id', id)
        client.queue_service_action_call('caption_captionasset', 'getRemotePaths', 'KalturaRemotePathListResponse', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
get_url(id, storage_id=KalturaNotImplemented) click to toggle source

Get download URL for the asset @return [string]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 485
def get_url(id, storage_id=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'id', id)
        client.add_param(kparams, 'storageId', storage_id)
        client.queue_service_action_call('caption_captionasset', 'getUrl', 'string', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) click to toggle source

List caption Assets by filter and pager @return [KalturaCaptionAssetListResponse]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 498
def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'filter', filter)
        client.add_param(kparams, 'pager', pager)
        client.queue_service_action_call('caption_captionasset', 'list', 'KalturaCaptionAssetListResponse', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
serve(caption_asset_id) click to toggle source

Serves caption by its id @return [file]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 511
def serve(caption_asset_id)
        kparams = {}
        client.add_param(kparams, 'captionAssetId', caption_asset_id)
        client.queue_service_action_call('caption_captionasset', 'serve', 'file', kparams)
        return client.get_serve_url()
end
serve_by_entry_id(entry_id, caption_param_id=KalturaNotImplemented) click to toggle source

Serves caption by entry id and thumnail params id @return [file]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 520
def serve_by_entry_id(entry_id, caption_param_id=KalturaNotImplemented)
        kparams = {}
        client.add_param(kparams, 'entryId', entry_id)
        client.add_param(kparams, 'captionParamId', caption_param_id)
        client.queue_service_action_call('caption_captionasset', 'serveByEntryId', 'file', kparams)
        return client.get_serve_url()
end
serve_web_vtt(caption_asset_id, segment_duration=30, segment_index=KalturaNotImplemented, local_timestamp=10000) click to toggle source

Serves caption by its id converting it to segmented WebVTT @return [file]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 530
def serve_web_vtt(caption_asset_id, segment_duration=30, segment_index=KalturaNotImplemented, local_timestamp=10000)
        kparams = {}
        client.add_param(kparams, 'captionAssetId', caption_asset_id)
        client.add_param(kparams, 'segmentDuration', segment_duration)
        client.add_param(kparams, 'segmentIndex', segment_index)
        client.add_param(kparams, 'localTimestamp', local_timestamp)
        client.queue_service_action_call('caption_captionasset', 'serveWebVTT', 'file', kparams)
        return client.get_serve_url()
end
set_as_default(caption_asset_id) click to toggle source

Markss the caption as default and removes that mark from all other caption assets of the entry. @return []

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 542
def set_as_default(caption_asset_id)
        kparams = {}
        client.add_param(kparams, 'captionAssetId', caption_asset_id)
        client.queue_service_action_call('caption_captionasset', 'setAsDefault', '', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
set_content(id, content_resource) click to toggle source

Update content of caption asset @return [KalturaCaptionAsset]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 554
def set_content(id, content_resource)
        kparams = {}
        client.add_param(kparams, 'id', id)
        client.add_param(kparams, 'contentResource', content_resource)
        client.queue_service_action_call('caption_captionasset', 'setContent', 'KalturaCaptionAsset', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end
update(id, caption_asset) click to toggle source

Update caption asset @return [KalturaCaptionAsset]

# File lib/kaltura_plugins/kaltura_caption_client_plugin.rb, line 567
def update(id, caption_asset)
        kparams = {}
        client.add_param(kparams, 'id', id)
        client.add_param(kparams, 'captionAsset', caption_asset)
        client.queue_service_action_call('caption_captionasset', 'update', 'KalturaCaptionAsset', kparams)
        if (client.is_multirequest)
                return nil
        end
        return client.do_queue()
end