Class: Kaltura::KalturaLiveChannelService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Overview

Live Channel service lets you manage live channels

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaLiveChannelService

Returns a new instance of KalturaLiveChannelService.



11004
11005
11006
# File 'lib/kaltura_client.rb', line 11004

def initialize(client)
	super(client)
end

Instance Method Details

#add(live_channel) ⇒ Object

Adds new live channel.



11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
# File 'lib/kaltura_client.rb', line 11010

def add(live_channel)
	kparams = {}
	# Live channel metadata  
	client.add_param(kparams, 'liveChannel', live_channel);
	client.queue_service_action_call('livechannel', 'add', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#append_recording(entry_id, media_server_index, resource, duration) ⇒ Object

Append recorded video to live entry



11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
# File 'lib/kaltura_client.rb', line 11092

def append_recording(entry_id, media_server_index, resource, duration)
	kparams = {}
	# Live entry id
	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.queue_service_action_call('livechannel', 'appendRecording', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#delete(id) ⇒ Object

Delete a live channel.



11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
# File 'lib/kaltura_client.rb', line 11051

def delete(id)
	kparams = {}
	# Live channel id to delete
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('livechannel', 'delete', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get(id) ⇒ Object

Get live channel by ID.



11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
# File 'lib/kaltura_client.rb', line 11023

def get(id)
	kparams = {}
	# Live channel id
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('livechannel', 'get', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#is_live(id) ⇒ Object

Delivering the status of a live channel (on-air/offline)



11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
# File 'lib/kaltura_client.rb', line 11079

def is_live(id)
	kparams = {}
	# ID of the live channel
	client.add_param(kparams, 'id', id);
	client.queue_service_action_call('livechannel', 'isLive', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object

List live channels by filter with paging support.



11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
# File 'lib/kaltura_client.rb', line 11064

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
	kparams = {}
	# live channel filter
	client.add_param(kparams, 'filter', filter);
	# Pager
	client.add_param(kparams, 'pager', pager);
	client.queue_service_action_call('livechannel', 'list', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#register_media_server(entry_id, hostname, media_server_index) ⇒ Object

Register media server to live entry



11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
# File 'lib/kaltura_client.rb', line 11108

def register_media_server(entry_id, hostname, media_server_index)
	kparams = {}
	# Live entry id
	client.add_param(kparams, 'entryId', entry_id);
	# Media server host name
	client.add_param(kparams, 'hostname', hostname);
	# Media server index primary / secondary
	client.add_param(kparams, 'mediaServerIndex', media_server_index);
	client.queue_service_action_call('livechannel', 'registerMediaServer', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#unregister_media_server(entry_id, hostname, media_server_index) ⇒ Object

Unregister media server from live entry



11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
# File 'lib/kaltura_client.rb', line 11125

def unregister_media_server(entry_id, hostname, media_server_index)
	kparams = {}
	# Live entry id
	client.add_param(kparams, 'entryId', entry_id);
	# Media server host name
	client.add_param(kparams, 'hostname', hostname);
	# Media server index primary / secondary
	client.add_param(kparams, 'mediaServerIndex', media_server_index);
	client.queue_service_action_call('livechannel', 'unregisterMediaServer', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#update(id, live_channel) ⇒ Object

Update live channel. Only the properties that were set will be updated.



11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
# File 'lib/kaltura_client.rb', line 11036

def update(id, live_channel)
	kparams = {}
	# Live channel id to update
	client.add_param(kparams, 'id', id);
	# Live channel metadata to update
	client.add_param(kparams, 'liveChannel', live_channel);
	client.queue_service_action_call('livechannel', 'update', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#validate_registered_media_servers(entry_id) ⇒ Object

Validates all registered media servers



11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
# File 'lib/kaltura_client.rb', line 11142

def validate_registered_media_servers(entry_id)
	kparams = {}
	# Live entry id
	client.add_param(kparams, 'entryId', entry_id);
	client.queue_service_action_call('livechannel', 'validateRegisteredMediaServers', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end