Class: Kaltura::KalturaLiveStreamService
- Inherits:
-
KalturaServiceBase
- Object
- KalturaServiceBase
- Kaltura::KalturaLiveStreamService
- Defined in:
- lib/kaltura_client.rb
Overview
Live Stream service lets you manage live stream entries
Instance Attribute Summary
Attributes inherited from KalturaServiceBase
Instance Method Summary collapse
-
#add(live_stream_entry, source_type = KalturaNotImplemented) ⇒ Object
Adds new live stream entry.
-
#append_recording(entry_id, media_server_index, resource, duration) ⇒ Object
Append recorded video to live entry.
-
#authenticate(entry_id, token) ⇒ Object
Authenticate live-stream entry against stream token and partner limitations.
-
#delete(entry_id) ⇒ Object
Delete a live stream entry.
-
#get(entry_id, version = -1)) ⇒ Object
Get live stream entry by ID.
-
#initialize(client) ⇒ KalturaLiveStreamService
constructor
A new instance of KalturaLiveStreamService.
-
#is_live(id, protocol) ⇒ Object
Delivering the status of a live stream (on-air/offline) if it is possible.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List live stream entries by filter with paging support.
-
#register_media_server(entry_id, hostname, media_server_index) ⇒ Object
Register media server to live entry.
-
#unregister_media_server(entry_id, hostname, media_server_index) ⇒ Object
Unregister media server from live entry.
-
#update(entry_id, live_stream_entry) ⇒ Object
Update live stream entry.
-
#update_offline_thumbnail_from_url(entry_id, url) ⇒ Object
Update entry thumbnail using url.
-
#update_offline_thumbnail_jpeg(entry_id, file_data) ⇒ Object
Update live stream entry thumbnail using a raw jpeg file.
-
#validate_registered_media_servers(entry_id) ⇒ Object
Validates all registered media servers.
Constructor Details
#initialize(client) ⇒ KalturaLiveStreamService
Returns a new instance of KalturaLiveStreamService.
11157 11158 11159 |
# File 'lib/kaltura_client.rb', line 11157 def initialize(client) super(client) end |
Instance Method Details
#add(live_stream_entry, source_type = KalturaNotImplemented) ⇒ Object
Adds new live stream entry. The entry will be queued for provision.
11164 11165 11166 11167 11168 11169 11170 11171 11172 11173 11174 11175 |
# File 'lib/kaltura_client.rb', line 11164 def add(live_stream_entry, source_type=KalturaNotImplemented) kparams = {} # Live stream entry metadata client.add_param(kparams, 'liveStreamEntry', live_stream_entry); # Live stream source type client.add_param(kparams, 'sourceType', source_type); client.queue_service_action_call('livestream', '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
11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 |
# File 'lib/kaltura_client.rb', line 11297 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('livestream', 'appendRecording', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#authenticate(entry_id, token) ⇒ Object
Authenticate live-stream entry against stream token and partner limitations
11194 11195 11196 11197 11198 11199 11200 11201 11202 11203 11204 11205 |
# File 'lib/kaltura_client.rb', line 11194 def authenticate(entry_id, token) kparams = {} # Live stream entry id client.add_param(kparams, 'entryId', entry_id); # Live stream broadcasting token client.add_param(kparams, 'token', token); client.queue_service_action_call('livestream', 'authenticate', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#delete(entry_id) ⇒ Object
Delete a live stream entry.
11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 |
# File 'lib/kaltura_client.rb', line 11224 def delete(entry_id) kparams = {} # Live stream entry id to delete 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 |
#get(entry_id, version = -1)) ⇒ Object
Get live stream entry by ID.
11179 11180 11181 11182 11183 11184 11185 11186 11187 11188 11189 11190 |
# File 'lib/kaltura_client.rb', line 11179 def get(entry_id, version=-1) kparams = {} # Live stream entry id client.add_param(kparams, 'entryId', entry_id); # Desired version of the data client.add_param(kparams, 'version', version); client.queue_service_action_call('livestream', 'get', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#is_live(id, protocol) ⇒ Object
Delivering the status of a live stream (on-air/offline) if it is possible
11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 |
# File 'lib/kaltura_client.rb', line 11282 def is_live(id, protocol) kparams = {} # ID of the live stream client.add_param(kparams, 'id', id); # protocol of the stream to test. client.add_param(kparams, 'protocol', protocol); client.queue_service_action_call('livestream', 'isLive', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object
List live stream entries by filter with paging support.
11237 11238 11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 |
# File 'lib/kaltura_client.rb', line 11237 def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented) kparams = {} # live stream entry filter client.add_param(kparams, 'filter', filter); # Pager client.add_param(kparams, 'pager', pager); client.queue_service_action_call('livestream', '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
11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 |
# File 'lib/kaltura_client.rb', line 11313 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('livestream', '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
11330 11331 11332 11333 11334 11335 11336 11337 11338 11339 11340 11341 11342 11343 |
# File 'lib/kaltura_client.rb', line 11330 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('livestream', 'unregisterMediaServer', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#update(entry_id, live_stream_entry) ⇒ Object
Update live stream entry. Only the properties that were set will be updated.
11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 11219 11220 |
# File 'lib/kaltura_client.rb', line 11209 def update(entry_id, live_stream_entry) kparams = {} # Live stream entry id to update client.add_param(kparams, 'entryId', entry_id); # Live stream entry metadata to update client.add_param(kparams, 'liveStreamEntry', live_stream_entry); client.queue_service_action_call('livestream', 'update', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#update_offline_thumbnail_from_url(entry_id, url) ⇒ Object
Update entry thumbnail using url
11267 11268 11269 11270 11271 11272 11273 11274 11275 11276 11277 11278 |
# File 'lib/kaltura_client.rb', line 11267 def update_offline_thumbnail_from_url(entry_id, url) kparams = {} # live stream entry id client.add_param(kparams, 'entryId', entry_id); # file url client.add_param(kparams, 'url', url); client.queue_service_action_call('livestream', 'updateOfflineThumbnailFromUrl', kparams); if (client.is_multirequest) return nil; end return client.do_queue(); end |
#update_offline_thumbnail_jpeg(entry_id, file_data) ⇒ Object
Update live stream entry thumbnail using a raw jpeg file
11252 11253 11254 11255 11256 11257 11258 11259 11260 11261 11262 11263 |
# File 'lib/kaltura_client.rb', line 11252 def update_offline_thumbnail_jpeg(entry_id, file_data) kparams = {} # live stream entry id client.add_param(kparams, 'entryId', entry_id); # Jpeg file data client.add_param(kparams, 'fileData', file_data); client.queue_service_action_call('livestream', 'updateOfflineThumbnailJpeg', 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
11347 11348 11349 11350 11351 11352 11353 11354 11355 11356 |
# File 'lib/kaltura_client.rb', line 11347 def validate_registered_media_servers(entry_id) kparams = {} # Live entry id 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 |