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) ⇒ KalturaLiveStreamEntry
Adds new live stream entry.
-
#add_live_stream_push_publish_configuration(entry_id, protocol, url = KalturaNotImplemented, live_stream_configuration = KalturaNotImplemented) ⇒ KalturaLiveStreamEntry
Add new pushPublish configuration to entry.
-
#allocate_conference_room(entry_id, env = '') ⇒ KalturaRoomDetails
Allocates a conference room or returns ones that has already been allocated.
-
#append_recording(entry_id, asset_id, media_server_index, resource, duration, is_last_chunk = false) ⇒ KalturaLiveEntry
Append recorded video to live entry.
-
#archive(live_entry_id, vod_entry_id) ⇒ bool
Archive a live entry which was recorded.
-
#authenticate(entry_id, token, hostname = KalturaNotImplemented, media_server_index = KalturaNotImplemented, application_name = KalturaNotImplemented) ⇒ KalturaLiveStreamEntry
Authenticate live-stream entry against stream token and partner limitations.
-
#create_periodic_sync_points(entry_id, interval, duration) ⇒ Object
Creates periodic metadata sync-point events on a live stream.
-
#create_recorded_entry(entry_id, media_server_index, live_entry_status) ⇒ KalturaLiveEntry
Create recorded entry id if it doesn’t exist and make sure it happens on the DC that the live entry was created on.
-
#delete(entry_id) ⇒ Object
Delete a live stream entry.
-
#finish_conf(entry_id, server_node_id = KalturaNotImplemented) ⇒ bool
When the conf is finished this API should be called.
-
#get(entry_id, version = -1)) ⇒ KalturaLiveStreamEntry
Get live stream entry by ID.
-
#get_details(id) ⇒ KalturaLiveStreamDetails
Delivering the status of a live stream (on-air/offline) if it is possible.
-
#initialize(client) ⇒ KalturaLiveStreamService
constructor
A new instance of KalturaLiveStreamService.
-
#is_live(id, protocol = KalturaNotImplemented) ⇒ bool
Delivering the status of a live stream (on-air/offline) if it is possible.
-
#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ KalturaLiveStreamListResponse
List live stream entries by filter with paging support.
-
#regenerate_stream_token(entry_id) ⇒ KalturaLiveEntry
Regenerate new secure token for liveStream.
-
#register_conf(entry_id) ⇒ bool
Mark that the conference has actually started.
-
#register_media_server(entry_id, hostname, media_server_index, application_name = KalturaNotImplemented, live_entry_status = 1, should_create_recorded_entry = true) ⇒ KalturaLiveEntry
Register media server to live entry.
-
#remove_live_stream_push_publish_configuration(entry_id, protocol) ⇒ KalturaLiveStreamEntry
Remove push publish configuration from entry.
-
#set_recorded_content(entry_id, media_server_index, resource, duration, recorded_entry_id = KalturaNotImplemented, flavor_params_id = KalturaNotImplemented) ⇒ KalturaLiveEntry
Set recorded video to live entry.
-
#unregister_media_server(entry_id, hostname, media_server_index) ⇒ KalturaLiveEntry
Unregister media server from live entry.
-
#update(entry_id, live_stream_entry) ⇒ KalturaLiveStreamEntry
Update live stream entry.
-
#update_offline_thumbnail_from_url(entry_id, url) ⇒ KalturaLiveStreamEntry
Update entry thumbnail using url.
-
#update_offline_thumbnail_jpeg(entry_id, file_data) ⇒ KalturaLiveStreamEntry
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.
2487 2488 2489 |
# File 'lib/kaltura_client.rb', line 2487 def initialize(client) super(client) end |
Instance Method Details
#add(live_stream_entry, source_type = KalturaNotImplemented) ⇒ KalturaLiveStreamEntry
Adds new live stream entry. The entry will be queued for provision.
2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 |
# File 'lib/kaltura_client.rb', line 2494 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) ⇒ KalturaLiveStreamEntry
Add new pushPublish configuration to entry
2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 |
# File 'lib/kaltura_client.rb', line 2507 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 = '') ⇒ KalturaRoomDetails
Allocates a conference room or returns ones that has already been allocated
2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 |
# File 'lib/kaltura_client.rb', line 2522 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) ⇒ KalturaLiveEntry
Append recorded video to live entry
2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 |
# File 'lib/kaltura_client.rb', line 2535 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) ⇒ bool
Archive a live entry which was recorded
2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 |
# File 'lib/kaltura_client.rb', line 2552 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) ⇒ KalturaLiveStreamEntry
Authenticate live-stream entry against stream token and partner limitations
2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 |
# File 'lib/kaltura_client.rb', line 2565 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) ⇒ Object
Creates periodic metadata sync-point events on a live stream
2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 |
# File 'lib/kaltura_client.rb', line 2581 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) ⇒ KalturaLiveEntry
Create recorded entry id if it doesn’t exist and make sure it happens on the DC that the live entry was created on.
2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 |
# File 'lib/kaltura_client.rb', line 2595 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) ⇒ Object
Delete a live stream entry.
2609 2610 2611 2612 2613 2614 2615 2616 2617 |
# File 'lib/kaltura_client.rb', line 2609 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) ⇒ bool
When the conf is finished this API should be called.
2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 |
# File 'lib/kaltura_client.rb', line 2621 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)) ⇒ KalturaLiveStreamEntry
Get live stream entry by ID.
2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 |
# File 'lib/kaltura_client.rb', line 2634 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) ⇒ KalturaLiveStreamDetails
Delivering the status of a live stream (on-air/offline) if it is possible
2647 2648 2649 2650 2651 2652 2653 2654 2655 |
# File 'lib/kaltura_client.rb', line 2647 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) ⇒ bool
Delivering the status of a live stream (on-air/offline) if it is possible
2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 |
# File 'lib/kaltura_client.rb', line 2659 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) ⇒ KalturaLiveStreamListResponse
List live stream entries by filter with paging support.
2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 |
# File 'lib/kaltura_client.rb', line 2672 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) ⇒ KalturaLiveEntry
Regenerate new secure token for liveStream
2685 2686 2687 2688 2689 2690 2691 2692 2693 |
# File 'lib/kaltura_client.rb', line 2685 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) ⇒ bool
Mark that the conference has actually started
2697 2698 2699 2700 2701 2702 2703 2704 2705 |
# File 'lib/kaltura_client.rb', line 2697 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) ⇒ KalturaLiveEntry
Register media server to live entry
2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 |
# File 'lib/kaltura_client.rb', line 2709 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) ⇒ KalturaLiveStreamEntry
Remove push publish configuration from entry
2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 |
# File 'lib/kaltura_client.rb', line 2726 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) ⇒ KalturaLiveEntry
Set recorded video to live entry
2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 |
# File 'lib/kaltura_client.rb', line 2739 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) ⇒ KalturaLiveEntry
Unregister media server from live entry
2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 |
# File 'lib/kaltura_client.rb', line 2756 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) ⇒ KalturaLiveStreamEntry
Update live stream entry. Only the properties that were set will be updated.
2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 |
# File 'lib/kaltura_client.rb', line 2770 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) ⇒ KalturaLiveStreamEntry
Update entry thumbnail using url
2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 |
# File 'lib/kaltura_client.rb', line 2783 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) ⇒ KalturaLiveStreamEntry
Update live stream entry thumbnail using a raw jpeg file
2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 |
# File 'lib/kaltura_client.rb', line 2796 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) ⇒ Object
Validates all registered media servers
2810 2811 2812 2813 2814 2815 2816 2817 2818 |
# File 'lib/kaltura_client.rb', line 2810 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 |