Class: Kaltura::KalturaMixingService

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

Overview

A Mix is an XML unique format invented by Kaltura, it allows the user to create a mix of videos and images, in and out points, transitions, text overlays, soundtrack, effects and much moreā€¦

Mixing service lets you create a new mix, manage its metadata and make basic manipulations.

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaMixingService

Returns a new instance of KalturaMixingService.



11867
11868
11869
# File 'lib/kaltura_client.rb', line 11867

def initialize(client)
	super(client)
end

Instance Method Details

#add(mix_entry) ⇒ Object

Adds a new mix. If the dataContent is null, a default timeline will be created.



11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
# File 'lib/kaltura_client.rb', line 11874

def add(mix_entry)
	kparams = {}
	# Mix entry metadata
	client.add_param(kparams, 'mixEntry', mix_entry);
	client.queue_service_action_call('mixing', 'add', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#anonymous_rank(entry_id, rank) ⇒ Object

Anonymously rank a mix entry, no validation is done on duplicate rankings



12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
# File 'lib/kaltura_client.rb', line 12013

def anonymous_rank(entry_id, rank)
	kparams = {}
	client.add_param(kparams, 'entryId', entry_id);
	client.add_param(kparams, 'rank', rank);
	client.queue_service_action_call('mixing', 'anonymousRank', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#append_media_entry(mix_entry_id, media_entry_id) ⇒ Object

Appends a media entry to a the end of the mix timeline, this will save the mix timeline as a new version.



11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
# File 'lib/kaltura_client.rb', line 11972

def append_media_entry(mix_entry_id, media_entry_id)
	kparams = {}
	# Mix entry to append to its timeline
	client.add_param(kparams, 'mixEntryId', mix_entry_id);
	# Media entry to append to the timeline
	client.add_param(kparams, 'mediaEntryId', media_entry_id);
	client.queue_service_action_call('mixing', 'appendMediaEntry', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#clone(entry_id) ⇒ Object

Clones an existing mix.



11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
# File 'lib/kaltura_client.rb', line 11959

def clone(entry_id)
	kparams = {}
	# Mix entry id to clone
	client.add_param(kparams, 'entryId', entry_id);
	client.queue_service_action_call('mixing', 'clone', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#count(filter = KalturaNotImplemented) ⇒ Object

Count mix entries by filter.



11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
# File 'lib/kaltura_client.rb', line 11946

def count(filter=KalturaNotImplemented)
	kparams = {}
	# Media entry filter
	client.add_param(kparams, 'filter', filter);
	client.queue_service_action_call('mixing', 'count', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#delete(entry_id) ⇒ Object

Delete a mix entry.



11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
# File 'lib/kaltura_client.rb', line 11917

def delete(entry_id)
	kparams = {}
	# Mix entry id to delete
	client.add_param(kparams, 'entryId', entry_id);
	client.queue_service_action_call('mixing', 'delete', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get(entry_id, version = -1)) ⇒ Object

Get mix entry by id.



11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
# File 'lib/kaltura_client.rb', line 11887

def get(entry_id, version=-1)
	kparams = {}
	# Mix 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('mixing', 'get', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get_mixes_by_media_id(media_entry_id) ⇒ Object

Get the mixes in which the media entry is included



11987
11988
11989
11990
11991
11992
11993
11994
11995
# File 'lib/kaltura_client.rb', line 11987

def get_mixes_by_media_id(media_entry_id)
	kparams = {}
	client.add_param(kparams, 'mediaEntryId', media_entry_id);
	client.queue_service_action_call('mixing', 'getMixesByMediaId', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

#get_ready_media_entries(mix_id, version = -1)) ⇒ Object

Get all ready media entries that exist in the given mix id



11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
# File 'lib/kaltura_client.rb', line 11999

def get_ready_media_entries(mix_id, version=-1)
	kparams = {}
	client.add_param(kparams, 'mixId', mix_id);
	# Desired version to get the data from
	client.add_param(kparams, 'version', version);
	client.queue_service_action_call('mixing', 'getReadyMediaEntries', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end

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

List entries by filter with paging support. Return parameter is an array of mix entries.



11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
# File 'lib/kaltura_client.rb', line 11931

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

#update(entry_id, mix_entry) ⇒ Object

Update mix entry. Only the properties that were set will be updated.



11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
# File 'lib/kaltura_client.rb', line 11902

def update(entry_id, mix_entry)
	kparams = {}
	# Mix entry id to update
	client.add_param(kparams, 'entryId', entry_id);
	# Mix entry metadata to update
	client.add_param(kparams, 'mixEntry', mix_entry);
	client.queue_service_action_call('mixing', 'update', kparams);
	if (client.is_multirequest)
		return nil;
	end
	return client.do_queue();
end