-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathKalturaCuePointService.js
129 lines (119 loc) · 3.45 KB
/
KalturaCuePointService.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/**
*Class definition for the Kaltura service: cuePoint.
**/
var KalturaCuePointService = {
/**
* Allows you to add an cue point object associated with an entry.
* @param cuePoint KalturaCuePoint (optional)
**/
add: function(cuePoint){
var kparams = new Object();
kparams.cuePoint = cuePoint;
return new KalturaRequestBuilder("cuepoint_cuepoint", "add", kparams);
},
/**
* Allows you to add multiple cue points objects by uploading XML that contains multiple cue point definitions.
* @param fileData HTMLElement (optional)
**/
addFromBulk: function(fileData){
var kparams = new Object();
var kfiles = new Object();
kfiles.fileData = fileData;
return new KalturaRequestBuilder("cuepoint_cuepoint", "addFromBulk", kparams, kfiles);
},
/**
* Clone cuePoint with id to given entry.
* @param id string (optional)
* @param entryId string (optional)
**/
cloneAction: function(id, entryId){
var kparams = new Object();
kparams.id = id;
kparams.entryId = entryId;
return new KalturaRequestBuilder("cuepoint_cuepoint", "clone", kparams);
},
/**
* count cue point objects by filter.
* @param filter KalturaCuePointFilter (optional, default: null)
**/
count: function(filter){
if(!filter)
filter = null;
var kparams = new Object();
if (filter != null)
kparams.filter = filter;
return new KalturaRequestBuilder("cuepoint_cuepoint", "count", kparams);
},
/**
* delete cue point by id, and delete all children cue points.
* @param id string (optional)
**/
deleteAction: function(id){
var kparams = new Object();
kparams.id = id;
return new KalturaRequestBuilder("cuepoint_cuepoint", "delete", kparams);
},
/**
* Retrieve an CuePoint object by id.
* @param id string (optional)
**/
get: function(id){
var kparams = new Object();
kparams.id = id;
return new KalturaRequestBuilder("cuepoint_cuepoint", "get", kparams);
},
/**
* List cue point objects by filter and pager.
* @param filter KalturaCuePointFilter (optional, default: null)
* @param pager KalturaFilterPager (optional, default: null)
**/
listAction: function(filter, pager){
if(!filter)
filter = null;
if(!pager)
pager = null;
var kparams = new Object();
if (filter != null)
kparams.filter = filter;
if (pager != null)
kparams.pager = pager;
return new KalturaRequestBuilder("cuepoint_cuepoint", "list", kparams);
},
/**
* Update cue point by id.
* @param id string (optional)
* @param cuePoint KalturaCuePoint (optional)
**/
update: function(id, cuePoint){
var kparams = new Object();
kparams.id = id;
kparams.cuePoint = cuePoint;
return new KalturaRequestBuilder("cuepoint_cuepoint", "update", kparams);
},
/**
* .
* @param id string (optional)
* @param startTime int (optional)
* @param endTime int (optional, default: null)
**/
updateCuePointsTimes: function(id, startTime, endTime){
if(!endTime)
endTime = null;
var kparams = new Object();
kparams.id = id;
kparams.startTime = startTime;
kparams.endTime = endTime;
return new KalturaRequestBuilder("cuepoint_cuepoint", "updateCuePointsTimes", kparams);
},
/**
* Update cuePoint status by id.
* @param id string (optional)
* @param status int (optional, enum: KalturaCuePointStatus)
**/
updateStatus: function(id, status){
var kparams = new Object();
kparams.id = id;
kparams.status = status;
return new KalturaRequestBuilder("cuepoint_cuepoint", "updateStatus", kparams);
}
}