kaltura-client 3.3.0 → 14.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README +23 -23
- data/lib/kaltura_client.rb +2054 -1860
- data/lib/kaltura_client_base.rb +4 -1
- data/lib/kaltura_enums.rb +612 -36
- data/lib/kaltura_plugins/kaltura_activiti_business_process_notification_client_plugin.rb +96 -0
- data/lib/kaltura_plugins/kaltura_ad_cue_point_client_plugin.rb +46 -17
- data/lib/kaltura_plugins/kaltura_admin_console_client_plugin.rb +61 -251
- data/lib/kaltura_plugins/kaltura_annotation_client_plugin.rb +131 -60
- data/lib/kaltura_plugins/kaltura_aspera_client_plugin.rb +62 -0
- data/lib/kaltura_plugins/kaltura_attachment_client_plugin.rb +83 -55
- data/lib/kaltura_plugins/kaltura_audit_client_plugin.rb +613 -0
- data/lib/kaltura_plugins/kaltura_avn_distribution_client_plugin.rb +109 -0
- data/lib/kaltura_plugins/kaltura_bpm_event_notification_integration_client_plugin.rb +61 -0
- data/lib/kaltura_plugins/kaltura_bulk_upload_client_plugin.rb +17 -19
- data/lib/kaltura_plugins/kaltura_bulk_upload_csv_client_plugin.rb +7 -6
- data/lib/kaltura_plugins/kaltura_bulk_upload_filter_client_plugin.rb +33 -13
- data/lib/kaltura_plugins/kaltura_bulk_upload_xml_client_plugin.rb +1 -2
- data/lib/kaltura_plugins/kaltura_business_process_notification_client_plugin.rb +545 -0
- data/lib/kaltura_plugins/kaltura_caption_client_plugin.rb +235 -114
- data/lib/kaltura_plugins/kaltura_caption_search_client_plugin.rb +86 -29
- data/lib/kaltura_plugins/kaltura_cielo24client_plugin.rb +39 -17
- data/lib/kaltura_plugins/kaltura_code_cue_point_client_plugin.rb +49 -18
- data/lib/kaltura_plugins/kaltura_comcast_mrss_distribution_client_plugin.rb +163 -0
- data/lib/kaltura_plugins/kaltura_content_distribution_client_plugin.rb +846 -439
- data/lib/kaltura_plugins/kaltura_cross_kaltura_distribution_client_plugin.rb +232 -0
- data/lib/kaltura_plugins/kaltura_cue_point_client_plugin.rb +229 -74
- data/lib/kaltura_plugins/kaltura_dailymotion_distribution_client_plugin.rb +199 -0
- data/lib/kaltura_plugins/kaltura_document_client_plugin.rb +140 -97
- data/lib/kaltura_plugins/kaltura_double_click_distribution_client_plugin.rb +142 -0
- data/lib/kaltura_plugins/kaltura_drm_client_plugin.rb +635 -0
- data/lib/kaltura_plugins/kaltura_drop_folder_client_plugin.rb +485 -196
- data/lib/kaltura_plugins/kaltura_drop_folder_xml_bulk_upload_client_plugin.rb +19 -1
- data/lib/kaltura_plugins/kaltura_elastic_search_client_plugin.rb +1228 -0
- data/lib/kaltura_plugins/kaltura_email_notification_client_plugin.rb +178 -89
- data/lib/kaltura_plugins/kaltura_event_cue_point_client_plugin.rb +10 -4
- data/lib/kaltura_plugins/kaltura_event_notification_client_plugin.rb +205 -95
- data/lib/kaltura_plugins/kaltura_external_media_client_plugin.rb +43 -32
- data/lib/kaltura_plugins/kaltura_facebook_distribution_client_plugin.rb +183 -0
- data/lib/kaltura_plugins/kaltura_fairplay_client_plugin.rb +62 -0
- data/lib/kaltura_plugins/kaltura_feed_drop_folder_client_plugin.rb +40 -16
- data/lib/kaltura_plugins/kaltura_file_sync_client_plugin.rb +182 -67
- data/lib/kaltura_plugins/kaltura_freewheel_distribution_client_plugin.rb +157 -0
- data/lib/kaltura_plugins/kaltura_freewheel_generic_distribution_client_plugin.rb +172 -0
- data/lib/kaltura_plugins/kaltura_ftp_distribution_client_plugin.rb +258 -0
- data/lib/kaltura_plugins/kaltura_http_notification_client_plugin.rb +154 -102
- data/lib/kaltura_plugins/kaltura_hulu_distribution_client_plugin.rb +213 -0
- data/lib/kaltura_plugins/kaltura_idetic_distribution_client_plugin.rb +131 -0
- data/lib/kaltura_plugins/kaltura_integration_client_plugin.rb +19 -10
- data/lib/kaltura_plugins/kaltura_kaltura_internal_tools_client_plugin.rb +1 -87
- data/lib/kaltura_plugins/kaltura_kontiki_client_plugin.rb +19 -10
- data/lib/kaltura_plugins/kaltura_like_client_plugin.rb +45 -25
- data/lib/kaltura_plugins/kaltura_metadata_client_plugin.rb +435 -213
- data/lib/kaltura_plugins/kaltura_metro_pcs_distribution_client_plugin.rb +155 -0
- data/lib/kaltura_plugins/kaltura_msn_distribution_client_plugin.rb +186 -0
- data/lib/kaltura_plugins/kaltura_play_ready_client_plugin.rb +482 -0
- data/lib/kaltura_plugins/kaltura_poll_client_plugin.rb +116 -0
- data/lib/kaltura_plugins/kaltura_push_notification_client_plugin.rb +154 -0
- data/lib/kaltura_plugins/kaltura_quick_play_distribution_client_plugin.rb +187 -0
- data/lib/kaltura_plugins/kaltura_quiz_client_plugin.rb +155 -58
- data/lib/kaltura_plugins/kaltura_schedule_bulk_upload_client_plugin.rb +107 -0
- data/lib/kaltura_plugins/kaltura_schedule_client_plugin.rb +1580 -0
- data/lib/kaltura_plugins/kaltura_schedule_drop_folder_client_plugin.rb +52 -0
- data/lib/kaltura_plugins/kaltura_scheduled_task_client_plugin.rb +277 -71
- data/lib/kaltura_plugins/kaltura_scheduled_task_content_distribution_client_plugin.rb +4 -3
- data/lib/kaltura_plugins/kaltura_scheduled_task_event_notification_client_plugin.rb +4 -3
- data/lib/kaltura_plugins/kaltura_scheduled_task_metadata_client_plugin.rb +10 -7
- data/lib/kaltura_plugins/kaltura_short_link_client_plugin.rb +113 -66
- data/lib/kaltura_plugins/kaltura_system_partner_client_plugin.rb +81 -517
- data/lib/kaltura_plugins/kaltura_tag_search_client_plugin.rb +63 -30
- data/lib/kaltura_plugins/kaltura_thumb_cue_point_client_plugin.rb +40 -16
- data/lib/kaltura_plugins/kaltura_transcript_client_plugin.rb +44 -8
- data/lib/kaltura_plugins/kaltura_unicorn_distribution_client_plugin.rb +212 -0
- data/lib/kaltura_plugins/kaltura_var_console_client_plugin.rb +75 -74
- data/lib/kaltura_plugins/kaltura_velocix_client_plugin.rb +10 -4
- data/lib/kaltura_plugins/kaltura_view_history_client_plugin.rb +112 -0
- data/lib/kaltura_plugins/kaltura_virus_scan_client_plugin.rb +119 -59
- data/lib/kaltura_plugins/kaltura_voicebase_client_plugin.rb +34 -19
- data/lib/kaltura_plugins/kaltura_webex_drop_folder_client_plugin.rb +207 -0
- data/lib/kaltura_plugins/kaltura_widevine_client_plugin.rb +299 -0
- data/lib/kaltura_plugins/kaltura_wowza_client_plugin.rb +22 -13
- data/lib/kaltura_plugins/kaltura_yahoo_distribution_client_plugin.rb +155 -0
- data/lib/kaltura_plugins/kaltura_you_tube_distribution_client_plugin.rb +382 -0
- data/lib/kaltura_plugins/kaltura_youtube_api_distribution_client_plugin.rb +219 -0
- data/lib/kaltura_types.rb +10305 -4858
- data/test/access_control_service_test.rb +43 -20
- data/test/base_entry_service_test.rb +57 -67
- data/test/configuration_test.rb +2 -34
- data/test/cue_point_service_test.rb +1 -1
- data/test/data_service_test.rb +19 -5
- data/test/document_service_test.rb +1 -1
- data/test/media_service_test.rb +296 -296
- data/test/metadata_profile_service_test.rb +1 -1
- metadata +52 -21
@@ -8,7 +8,7 @@
|
|
8
8
|
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
9
|
# text.
|
10
10
|
#
|
11
|
-
# Copyright (C) 2006-
|
11
|
+
# Copyright (C) 2006-2019 Kaltura Inc.
|
12
12
|
#
|
13
13
|
# This program is free software: you can redistribute it and/or modify
|
14
14
|
# it under the terms of the GNU Affero General Public License as
|
@@ -27,37 +27,31 @@
|
|
27
27
|
# ===================================================================================================
|
28
28
|
require 'kaltura_client.rb'
|
29
29
|
require File.dirname(__FILE__) + '/kaltura_integration_client_plugin.rb'
|
30
|
+
require File.dirname(__FILE__) + '/kaltura_transcript_client_plugin.rb'
|
30
31
|
|
31
32
|
module Kaltura
|
32
33
|
|
33
34
|
class KalturaVoicebaseJobProviderData < KalturaIntegrationJobProviderData
|
34
35
|
# Entry ID
|
35
|
-
#
|
36
36
|
attr_accessor :entry_id
|
37
37
|
# Flavor ID
|
38
|
-
#
|
39
38
|
attr_accessor :flavor_asset_id
|
40
39
|
# input Transcript-asset ID
|
41
|
-
#
|
42
40
|
attr_accessor :transcript_id
|
43
41
|
# Caption formats
|
44
|
-
#
|
45
42
|
attr_accessor :caption_asset_formats
|
46
43
|
# Api key for service provider
|
47
|
-
#
|
48
44
|
attr_accessor :api_key
|
49
45
|
# Api key for service provider
|
50
|
-
#
|
51
46
|
attr_accessor :api_password
|
52
47
|
# Transcript content language
|
53
|
-
#
|
54
48
|
attr_accessor :spoken_language
|
55
49
|
# Transcript Content location
|
56
|
-
#
|
57
50
|
attr_accessor :file_location
|
58
51
|
# should replace remote media content
|
59
|
-
#
|
60
52
|
attr_accessor :replace_media_content
|
53
|
+
# additional parameters to send to VoiceBase
|
54
|
+
attr_accessor :additional_parameters
|
61
55
|
|
62
56
|
def replace_media_content=(val)
|
63
57
|
@replace_media_content = to_b(val)
|
@@ -65,15 +59,36 @@ module Kaltura
|
|
65
59
|
|
66
60
|
def from_xml(xml_element)
|
67
61
|
super
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
62
|
+
if xml_element.elements['entryId'] != nil
|
63
|
+
self.entry_id = xml_element.elements['entryId'].text
|
64
|
+
end
|
65
|
+
if xml_element.elements['flavorAssetId'] != nil
|
66
|
+
self.flavor_asset_id = xml_element.elements['flavorAssetId'].text
|
67
|
+
end
|
68
|
+
if xml_element.elements['transcriptId'] != nil
|
69
|
+
self.transcript_id = xml_element.elements['transcriptId'].text
|
70
|
+
end
|
71
|
+
if xml_element.elements['captionAssetFormats'] != nil
|
72
|
+
self.caption_asset_formats = xml_element.elements['captionAssetFormats'].text
|
73
|
+
end
|
74
|
+
if xml_element.elements['apiKey'] != nil
|
75
|
+
self.api_key = xml_element.elements['apiKey'].text
|
76
|
+
end
|
77
|
+
if xml_element.elements['apiPassword'] != nil
|
78
|
+
self.api_password = xml_element.elements['apiPassword'].text
|
79
|
+
end
|
80
|
+
if xml_element.elements['spokenLanguage'] != nil
|
81
|
+
self.spoken_language = xml_element.elements['spokenLanguage'].text
|
82
|
+
end
|
83
|
+
if xml_element.elements['fileLocation'] != nil
|
84
|
+
self.file_location = xml_element.elements['fileLocation'].text
|
85
|
+
end
|
86
|
+
if xml_element.elements['replaceMediaContent'] != nil
|
87
|
+
self.replace_media_content = xml_element.elements['replaceMediaContent'].text
|
88
|
+
end
|
89
|
+
if xml_element.elements['additionalParameters'] != nil
|
90
|
+
self.additional_parameters = xml_element.elements['additionalParameters'].text
|
91
|
+
end
|
77
92
|
end
|
78
93
|
|
79
94
|
end
|
@@ -0,0 +1,207 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2019 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
require File.dirname(__FILE__) + '/kaltura_drop_folder_client_plugin.rb'
|
30
|
+
|
31
|
+
module Kaltura
|
32
|
+
|
33
|
+
class KalturaWebexDropFolderFileOrderBy
|
34
|
+
CREATED_AT_ASC = "+createdAt"
|
35
|
+
FILE_NAME_ASC = "+fileName"
|
36
|
+
FILE_SIZE_ASC = "+fileSize"
|
37
|
+
FILE_SIZE_LAST_SET_AT_ASC = "+fileSizeLastSetAt"
|
38
|
+
ID_ASC = "+id"
|
39
|
+
PARSED_FLAVOR_ASC = "+parsedFlavor"
|
40
|
+
PARSED_SLUG_ASC = "+parsedSlug"
|
41
|
+
UPDATED_AT_ASC = "+updatedAt"
|
42
|
+
CREATED_AT_DESC = "-createdAt"
|
43
|
+
FILE_NAME_DESC = "-fileName"
|
44
|
+
FILE_SIZE_DESC = "-fileSize"
|
45
|
+
FILE_SIZE_LAST_SET_AT_DESC = "-fileSizeLastSetAt"
|
46
|
+
ID_DESC = "-id"
|
47
|
+
PARSED_FLAVOR_DESC = "-parsedFlavor"
|
48
|
+
PARSED_SLUG_DESC = "-parsedSlug"
|
49
|
+
UPDATED_AT_DESC = "-updatedAt"
|
50
|
+
end
|
51
|
+
|
52
|
+
class KalturaWebexDropFolderOrderBy
|
53
|
+
CREATED_AT_ASC = "+createdAt"
|
54
|
+
ID_ASC = "+id"
|
55
|
+
NAME_ASC = "+name"
|
56
|
+
UPDATED_AT_ASC = "+updatedAt"
|
57
|
+
CREATED_AT_DESC = "-createdAt"
|
58
|
+
ID_DESC = "-id"
|
59
|
+
NAME_DESC = "-name"
|
60
|
+
UPDATED_AT_DESC = "-updatedAt"
|
61
|
+
end
|
62
|
+
|
63
|
+
class KalturaWebexDropFolder < KalturaDropFolder
|
64
|
+
attr_accessor :webex_user_id
|
65
|
+
attr_accessor :webex_password
|
66
|
+
attr_accessor :webex_site_id
|
67
|
+
attr_accessor :webex_partner_id
|
68
|
+
attr_accessor :webex_service_url
|
69
|
+
attr_accessor :webex_host_id_metadata_field_name
|
70
|
+
attr_accessor :delete_from_recycle_bin
|
71
|
+
attr_accessor :webex_service_type
|
72
|
+
attr_accessor :webex_site_name
|
73
|
+
attr_accessor :delete_from_timestamp
|
74
|
+
|
75
|
+
def webex_site_id=(val)
|
76
|
+
@webex_site_id = val.to_i
|
77
|
+
end
|
78
|
+
def delete_from_recycle_bin=(val)
|
79
|
+
@delete_from_recycle_bin = to_b(val)
|
80
|
+
end
|
81
|
+
def delete_from_timestamp=(val)
|
82
|
+
@delete_from_timestamp = val.to_i
|
83
|
+
end
|
84
|
+
|
85
|
+
def from_xml(xml_element)
|
86
|
+
super
|
87
|
+
if xml_element.elements['webexUserId'] != nil
|
88
|
+
self.webex_user_id = xml_element.elements['webexUserId'].text
|
89
|
+
end
|
90
|
+
if xml_element.elements['webexPassword'] != nil
|
91
|
+
self.webex_password = xml_element.elements['webexPassword'].text
|
92
|
+
end
|
93
|
+
if xml_element.elements['webexSiteId'] != nil
|
94
|
+
self.webex_site_id = xml_element.elements['webexSiteId'].text
|
95
|
+
end
|
96
|
+
if xml_element.elements['webexPartnerId'] != nil
|
97
|
+
self.webex_partner_id = xml_element.elements['webexPartnerId'].text
|
98
|
+
end
|
99
|
+
if xml_element.elements['webexServiceUrl'] != nil
|
100
|
+
self.webex_service_url = xml_element.elements['webexServiceUrl'].text
|
101
|
+
end
|
102
|
+
if xml_element.elements['webexHostIdMetadataFieldName'] != nil
|
103
|
+
self.webex_host_id_metadata_field_name = xml_element.elements['webexHostIdMetadataFieldName'].text
|
104
|
+
end
|
105
|
+
if xml_element.elements['deleteFromRecycleBin'] != nil
|
106
|
+
self.delete_from_recycle_bin = xml_element.elements['deleteFromRecycleBin'].text
|
107
|
+
end
|
108
|
+
if xml_element.elements['webexServiceType'] != nil
|
109
|
+
self.webex_service_type = xml_element.elements['webexServiceType'].text
|
110
|
+
end
|
111
|
+
if xml_element.elements['webexSiteName'] != nil
|
112
|
+
self.webex_site_name = xml_element.elements['webexSiteName'].text
|
113
|
+
end
|
114
|
+
if xml_element.elements['deleteFromTimestamp'] != nil
|
115
|
+
self.delete_from_timestamp = xml_element.elements['deleteFromTimestamp'].text
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
class KalturaWebexDropFolderFile < KalturaDropFolderFile
|
122
|
+
attr_accessor :recording_id
|
123
|
+
attr_accessor :webex_host_id
|
124
|
+
attr_accessor :description
|
125
|
+
attr_accessor :conf_id
|
126
|
+
attr_accessor :content_url
|
127
|
+
|
128
|
+
def recording_id=(val)
|
129
|
+
@recording_id = val.to_i
|
130
|
+
end
|
131
|
+
|
132
|
+
def from_xml(xml_element)
|
133
|
+
super
|
134
|
+
if xml_element.elements['recordingId'] != nil
|
135
|
+
self.recording_id = xml_element.elements['recordingId'].text
|
136
|
+
end
|
137
|
+
if xml_element.elements['webexHostId'] != nil
|
138
|
+
self.webex_host_id = xml_element.elements['webexHostId'].text
|
139
|
+
end
|
140
|
+
if xml_element.elements['description'] != nil
|
141
|
+
self.description = xml_element.elements['description'].text
|
142
|
+
end
|
143
|
+
if xml_element.elements['confId'] != nil
|
144
|
+
self.conf_id = xml_element.elements['confId'].text
|
145
|
+
end
|
146
|
+
if xml_element.elements['contentUrl'] != nil
|
147
|
+
self.content_url = xml_element.elements['contentUrl'].text
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
end
|
152
|
+
|
153
|
+
class KalturaWebexDropFolderContentProcessorJobData < KalturaDropFolderContentProcessorJobData
|
154
|
+
attr_accessor :description
|
155
|
+
attr_accessor :webex_host_id
|
156
|
+
|
157
|
+
|
158
|
+
def from_xml(xml_element)
|
159
|
+
super
|
160
|
+
if xml_element.elements['description'] != nil
|
161
|
+
self.description = xml_element.elements['description'].text
|
162
|
+
end
|
163
|
+
if xml_element.elements['webexHostId'] != nil
|
164
|
+
self.webex_host_id = xml_element.elements['webexHostId'].text
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
|
170
|
+
class KalturaWebexDropFolderBaseFilter < KalturaDropFolderFilter
|
171
|
+
|
172
|
+
|
173
|
+
def from_xml(xml_element)
|
174
|
+
super
|
175
|
+
end
|
176
|
+
|
177
|
+
end
|
178
|
+
|
179
|
+
class KalturaWebexDropFolderFileBaseFilter < KalturaDropFolderFileFilter
|
180
|
+
|
181
|
+
|
182
|
+
def from_xml(xml_element)
|
183
|
+
super
|
184
|
+
end
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
class KalturaWebexDropFolderFileFilter < KalturaWebexDropFolderFileBaseFilter
|
189
|
+
|
190
|
+
|
191
|
+
def from_xml(xml_element)
|
192
|
+
super
|
193
|
+
end
|
194
|
+
|
195
|
+
end
|
196
|
+
|
197
|
+
class KalturaWebexDropFolderFilter < KalturaWebexDropFolderBaseFilter
|
198
|
+
|
199
|
+
|
200
|
+
def from_xml(xml_element)
|
201
|
+
super
|
202
|
+
end
|
203
|
+
|
204
|
+
end
|
205
|
+
|
206
|
+
|
207
|
+
end
|
@@ -0,0 +1,299 @@
|
|
1
|
+
# ===================================================================================================
|
2
|
+
# _ __ _ _
|
3
|
+
# | |/ /__ _| | |_ _ _ _ _ __ _
|
4
|
+
# | ' </ _` | | _| || | '_/ _` |
|
5
|
+
# |_|\_\__,_|_|\__|\_,_|_| \__,_|
|
6
|
+
#
|
7
|
+
# This file is part of the Kaltura Collaborative Media Suite which allows users
|
8
|
+
# to do with audio, video, and animation what Wiki platfroms allow them to do with
|
9
|
+
# text.
|
10
|
+
#
|
11
|
+
# Copyright (C) 2006-2019 Kaltura Inc.
|
12
|
+
#
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
14
|
+
# it under the terms of the GNU Affero General Public License as
|
15
|
+
# published by the Free Software Foundation, either version 3 of the
|
16
|
+
# License, or (at your option) any later version.
|
17
|
+
#
|
18
|
+
# This program is distributed in the hope that it will be useful,
|
19
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
+
# GNU Affero General Public License for more details.
|
22
|
+
#
|
23
|
+
# You should have received a copy of the GNU Affero General Public License
|
24
|
+
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
25
|
+
#
|
26
|
+
# @ignore
|
27
|
+
# ===================================================================================================
|
28
|
+
require 'kaltura_client.rb'
|
29
|
+
require File.dirname(__FILE__) + '/kaltura_drm_client_plugin.rb'
|
30
|
+
|
31
|
+
module Kaltura
|
32
|
+
|
33
|
+
class KalturaWidevineRepositorySyncMode
|
34
|
+
MODIFY = 0
|
35
|
+
end
|
36
|
+
|
37
|
+
class KalturaWidevineFlavorAssetOrderBy
|
38
|
+
CREATED_AT_ASC = "+createdAt"
|
39
|
+
DELETED_AT_ASC = "+deletedAt"
|
40
|
+
SIZE_ASC = "+size"
|
41
|
+
UPDATED_AT_ASC = "+updatedAt"
|
42
|
+
CREATED_AT_DESC = "-createdAt"
|
43
|
+
DELETED_AT_DESC = "-deletedAt"
|
44
|
+
SIZE_DESC = "-size"
|
45
|
+
UPDATED_AT_DESC = "-updatedAt"
|
46
|
+
end
|
47
|
+
|
48
|
+
class KalturaWidevineFlavorParamsOrderBy
|
49
|
+
end
|
50
|
+
|
51
|
+
class KalturaWidevineFlavorParamsOutputOrderBy
|
52
|
+
end
|
53
|
+
|
54
|
+
class KalturaWidevineProfileOrderBy
|
55
|
+
ID_ASC = "+id"
|
56
|
+
NAME_ASC = "+name"
|
57
|
+
ID_DESC = "-id"
|
58
|
+
NAME_DESC = "-name"
|
59
|
+
end
|
60
|
+
|
61
|
+
class KalturaWidevineProfile < KalturaDrmProfile
|
62
|
+
attr_accessor :key
|
63
|
+
attr_accessor :iv
|
64
|
+
attr_accessor :owner
|
65
|
+
attr_accessor :portal
|
66
|
+
attr_accessor :max_gop
|
67
|
+
attr_accessor :reg_server_host
|
68
|
+
|
69
|
+
def max_gop=(val)
|
70
|
+
@max_gop = val.to_i
|
71
|
+
end
|
72
|
+
|
73
|
+
def from_xml(xml_element)
|
74
|
+
super
|
75
|
+
if xml_element.elements['key'] != nil
|
76
|
+
self.key = xml_element.elements['key'].text
|
77
|
+
end
|
78
|
+
if xml_element.elements['iv'] != nil
|
79
|
+
self.iv = xml_element.elements['iv'].text
|
80
|
+
end
|
81
|
+
if xml_element.elements['owner'] != nil
|
82
|
+
self.owner = xml_element.elements['owner'].text
|
83
|
+
end
|
84
|
+
if xml_element.elements['portal'] != nil
|
85
|
+
self.portal = xml_element.elements['portal'].text
|
86
|
+
end
|
87
|
+
if xml_element.elements['maxGop'] != nil
|
88
|
+
self.max_gop = xml_element.elements['maxGop'].text
|
89
|
+
end
|
90
|
+
if xml_element.elements['regServerHost'] != nil
|
91
|
+
self.reg_server_host = xml_element.elements['regServerHost'].text
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
96
|
+
|
97
|
+
class KalturaWidevineRepositorySyncJobData < KalturaJobData
|
98
|
+
attr_accessor :sync_mode
|
99
|
+
attr_accessor :wv_asset_ids
|
100
|
+
attr_accessor :modified_attributes
|
101
|
+
attr_accessor :monitor_sync_completion
|
102
|
+
|
103
|
+
def sync_mode=(val)
|
104
|
+
@sync_mode = val.to_i
|
105
|
+
end
|
106
|
+
def monitor_sync_completion=(val)
|
107
|
+
@monitor_sync_completion = val.to_i
|
108
|
+
end
|
109
|
+
|
110
|
+
def from_xml(xml_element)
|
111
|
+
super
|
112
|
+
if xml_element.elements['syncMode'] != nil
|
113
|
+
self.sync_mode = xml_element.elements['syncMode'].text
|
114
|
+
end
|
115
|
+
if xml_element.elements['wvAssetIds'] != nil
|
116
|
+
self.wv_asset_ids = xml_element.elements['wvAssetIds'].text
|
117
|
+
end
|
118
|
+
if xml_element.elements['modifiedAttributes'] != nil
|
119
|
+
self.modified_attributes = xml_element.elements['modifiedAttributes'].text
|
120
|
+
end
|
121
|
+
if xml_element.elements['monitorSyncCompletion'] != nil
|
122
|
+
self.monitor_sync_completion = xml_element.elements['monitorSyncCompletion'].text
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
class KalturaWidevineFlavorAsset < KalturaFlavorAsset
|
129
|
+
# License distribution window start date
|
130
|
+
attr_accessor :widevine_distribution_start_date
|
131
|
+
# License distribution window end date
|
132
|
+
attr_accessor :widevine_distribution_end_date
|
133
|
+
# Widevine unique asset id
|
134
|
+
attr_accessor :widevine_asset_id
|
135
|
+
|
136
|
+
def widevine_distribution_start_date=(val)
|
137
|
+
@widevine_distribution_start_date = val.to_i
|
138
|
+
end
|
139
|
+
def widevine_distribution_end_date=(val)
|
140
|
+
@widevine_distribution_end_date = val.to_i
|
141
|
+
end
|
142
|
+
def widevine_asset_id=(val)
|
143
|
+
@widevine_asset_id = val.to_i
|
144
|
+
end
|
145
|
+
|
146
|
+
def from_xml(xml_element)
|
147
|
+
super
|
148
|
+
if xml_element.elements['widevineDistributionStartDate'] != nil
|
149
|
+
self.widevine_distribution_start_date = xml_element.elements['widevineDistributionStartDate'].text
|
150
|
+
end
|
151
|
+
if xml_element.elements['widevineDistributionEndDate'] != nil
|
152
|
+
self.widevine_distribution_end_date = xml_element.elements['widevineDistributionEndDate'].text
|
153
|
+
end
|
154
|
+
if xml_element.elements['widevineAssetId'] != nil
|
155
|
+
self.widevine_asset_id = xml_element.elements['widevineAssetId'].text
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
end
|
160
|
+
|
161
|
+
class KalturaWidevineFlavorParams < KalturaFlavorParams
|
162
|
+
|
163
|
+
|
164
|
+
def from_xml(xml_element)
|
165
|
+
super
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
|
170
|
+
class KalturaWidevineFlavorParamsOutput < KalturaFlavorParamsOutput
|
171
|
+
# License distribution window start date
|
172
|
+
attr_accessor :widevine_distribution_start_date
|
173
|
+
# License distribution window end date
|
174
|
+
attr_accessor :widevine_distribution_end_date
|
175
|
+
|
176
|
+
def widevine_distribution_start_date=(val)
|
177
|
+
@widevine_distribution_start_date = val.to_i
|
178
|
+
end
|
179
|
+
def widevine_distribution_end_date=(val)
|
180
|
+
@widevine_distribution_end_date = val.to_i
|
181
|
+
end
|
182
|
+
|
183
|
+
def from_xml(xml_element)
|
184
|
+
super
|
185
|
+
if xml_element.elements['widevineDistributionStartDate'] != nil
|
186
|
+
self.widevine_distribution_start_date = xml_element.elements['widevineDistributionStartDate'].text
|
187
|
+
end
|
188
|
+
if xml_element.elements['widevineDistributionEndDate'] != nil
|
189
|
+
self.widevine_distribution_end_date = xml_element.elements['widevineDistributionEndDate'].text
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
end
|
194
|
+
|
195
|
+
class KalturaWidevineProfileBaseFilter < KalturaDrmProfileFilter
|
196
|
+
|
197
|
+
|
198
|
+
def from_xml(xml_element)
|
199
|
+
super
|
200
|
+
end
|
201
|
+
|
202
|
+
end
|
203
|
+
|
204
|
+
class KalturaWidevineProfileFilter < KalturaWidevineProfileBaseFilter
|
205
|
+
|
206
|
+
|
207
|
+
def from_xml(xml_element)
|
208
|
+
super
|
209
|
+
end
|
210
|
+
|
211
|
+
end
|
212
|
+
|
213
|
+
class KalturaWidevineFlavorAssetBaseFilter < KalturaFlavorAssetFilter
|
214
|
+
|
215
|
+
|
216
|
+
def from_xml(xml_element)
|
217
|
+
super
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
|
222
|
+
class KalturaWidevineFlavorParamsBaseFilter < KalturaFlavorParamsFilter
|
223
|
+
|
224
|
+
|
225
|
+
def from_xml(xml_element)
|
226
|
+
super
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
|
231
|
+
class KalturaWidevineFlavorAssetFilter < KalturaWidevineFlavorAssetBaseFilter
|
232
|
+
|
233
|
+
|
234
|
+
def from_xml(xml_element)
|
235
|
+
super
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
239
|
+
|
240
|
+
class KalturaWidevineFlavorParamsFilter < KalturaWidevineFlavorParamsBaseFilter
|
241
|
+
|
242
|
+
|
243
|
+
def from_xml(xml_element)
|
244
|
+
super
|
245
|
+
end
|
246
|
+
|
247
|
+
end
|
248
|
+
|
249
|
+
class KalturaWidevineFlavorParamsOutputBaseFilter < KalturaFlavorParamsOutputFilter
|
250
|
+
|
251
|
+
|
252
|
+
def from_xml(xml_element)
|
253
|
+
super
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
257
|
+
|
258
|
+
class KalturaWidevineFlavorParamsOutputFilter < KalturaWidevineFlavorParamsOutputBaseFilter
|
259
|
+
|
260
|
+
|
261
|
+
def from_xml(xml_element)
|
262
|
+
super
|
263
|
+
end
|
264
|
+
|
265
|
+
end
|
266
|
+
|
267
|
+
|
268
|
+
# WidevineDrmService serves as a license proxy to a Widevine license server
|
269
|
+
class KalturaWidevineDrmService < KalturaServiceBase
|
270
|
+
def initialize(client)
|
271
|
+
super(client)
|
272
|
+
end
|
273
|
+
|
274
|
+
# Get license for encrypted content playback
|
275
|
+
# @return [string]
|
276
|
+
def get_license(flavor_asset_id, referrer=KalturaNotImplemented)
|
277
|
+
kparams = {}
|
278
|
+
client.add_param(kparams, 'flavorAssetId', flavor_asset_id)
|
279
|
+
client.add_param(kparams, 'referrer', referrer)
|
280
|
+
client.queue_service_action_call('widevine_widevinedrm', 'getLicense', 'string', kparams)
|
281
|
+
if (client.is_multirequest)
|
282
|
+
return nil
|
283
|
+
end
|
284
|
+
return client.do_queue()
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
class KalturaClient < KalturaClientBase
|
289
|
+
attr_reader :widevine_drm_service
|
290
|
+
def widevine_drm_service
|
291
|
+
if (@widevine_drm_service == nil)
|
292
|
+
@widevine_drm_service = KalturaWidevineDrmService.new(self)
|
293
|
+
end
|
294
|
+
return @widevine_drm_service
|
295
|
+
end
|
296
|
+
|
297
|
+
end
|
298
|
+
|
299
|
+
end
|