cloudinary-video-player 1.6.4-edge.2 → 1.7.0-edge.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cld-video-player.js +3 -3
- package/dist/cld-video-player.light.js +2 -2
- package/dist/cld-video-player.light.min.js +1 -1
- package/dist/cld-video-player.min.js +1 -1
- package/docs/360.html +3 -3
- package/docs/analytics.html +4 -0
- package/docs/raw-url.html +14 -2
- package/docs/subtitles-and-captions.html +31 -27
- package/package.json +1 -1
- package/src/plugins/dash/videojs-dash.js +1 -1
package/docs/360.html
CHANGED
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
<script type="text/javascript">
|
|
26
26
|
window.addEventListener('load', function(){
|
|
27
27
|
|
|
28
|
-
var cld = cloudinary.Cloudinary.new({ cloud_name: '
|
|
28
|
+
var cld = cloudinary.Cloudinary.new({ cloud_name: 'demo' });
|
|
29
29
|
|
|
30
30
|
player = cld.videoPlayer('player', {
|
|
31
|
-
publicId: '
|
|
31
|
+
publicId: 'video-player/Golden-Gate-Bridge',
|
|
32
32
|
sourceTypes: ['mp4'],
|
|
33
33
|
transformation: {
|
|
34
34
|
width: 950,
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
var cld = cloudinary.Cloudinary.new({ cloud_name: 'demo' });
|
|
78
78
|
|
|
79
79
|
player = cld.videoPlayer('player', {
|
|
80
|
-
publicId: '
|
|
80
|
+
publicId: 'video-player/Golden-Gate-Bridge',
|
|
81
81
|
sourceTypes: ['mp4'],
|
|
82
82
|
transformation: {
|
|
83
83
|
width: 950,
|
package/docs/analytics.html
CHANGED
package/docs/raw-url.html
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
player = cld.videoPlayer('player');
|
|
35
35
|
|
|
36
36
|
player.source('https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_2MB.mp4');
|
|
37
|
+
|
|
37
38
|
adpPlayer = cld.videoPlayer('adpPlayer');
|
|
38
39
|
adpPlayer.source('https://res.cloudinary.com/demo/video/upload/sp_hd/sea_turtle.mpd');
|
|
39
40
|
}, false);
|
|
@@ -87,6 +88,16 @@
|
|
|
87
88
|
class="cld-video-player"
|
|
88
89
|
width="500">
|
|
89
90
|
</video>
|
|
91
|
+
|
|
92
|
+
<video
|
|
93
|
+
id="adpPlayer"
|
|
94
|
+
playsinline
|
|
95
|
+
controls
|
|
96
|
+
muted
|
|
97
|
+
autoplay
|
|
98
|
+
class="cld-video-player"
|
|
99
|
+
width="500">
|
|
100
|
+
</video>
|
|
90
101
|
</code>
|
|
91
102
|
<code class="language-javascript">
|
|
92
103
|
var cld = cloudinary.Cloudinary.new({ cloud_name: 'demo', secure: true });
|
|
@@ -94,8 +105,9 @@
|
|
|
94
105
|
var player = cld.videoPlayer('player');
|
|
95
106
|
|
|
96
107
|
player.source('https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_2MB.mp4');
|
|
97
|
-
|
|
98
|
-
adpPlayer.
|
|
108
|
+
|
|
109
|
+
var adpPlayer = cld.videoPlayer('adpPlayer');
|
|
110
|
+
adpPlayer.source('https://res.cloudinary.com/demo/video/upload/sp_hd/sea_turtle.mpd');
|
|
99
111
|
</code>
|
|
100
112
|
</pre>
|
|
101
113
|
</div>
|
|
@@ -29,34 +29,30 @@
|
|
|
29
29
|
<script type="text/javascript">
|
|
30
30
|
window.addEventListener('load', function(){
|
|
31
31
|
|
|
32
|
-
var cld = cloudinary.Cloudinary.new({ cloud_name: '
|
|
32
|
+
var cld = cloudinary.Cloudinary.new({ cloud_name: 'demo' });
|
|
33
33
|
|
|
34
34
|
var player = cld.videoPlayer('player');
|
|
35
35
|
|
|
36
36
|
player.source(
|
|
37
|
-
'stubhub',
|
|
37
|
+
'video-player/stubhub',
|
|
38
38
|
{
|
|
39
39
|
textTracks: {
|
|
40
40
|
captions: {
|
|
41
41
|
label: 'English captions',
|
|
42
42
|
language: 'en',
|
|
43
43
|
default: true,
|
|
44
|
-
url: 'https://res.cloudinary.com/
|
|
44
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636972013/video-player/vtt/Meetup_english.vtt'
|
|
45
45
|
},
|
|
46
46
|
subtitles: [
|
|
47
47
|
{
|
|
48
48
|
label: 'German subtitles',
|
|
49
49
|
language: 'de',
|
|
50
|
-
url: 'https://res.cloudinary.com/
|
|
50
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636970250/video-player/vtt/Meetup_german.vtt'
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
label: 'Russian subtitles',
|
|
54
54
|
language: 'ru',
|
|
55
|
-
url: 'https://res.cloudinary.com/
|
|
56
|
-
},{
|
|
57
|
-
label: 'Hebrew subtitles',
|
|
58
|
-
language: 'he',
|
|
59
|
-
url: 'https://res.cloudinary.com/yaronr/raw/upload/v1558966053/Meetup_heb.vtt.mv'
|
|
55
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636970275/video-player/vtt/Meetup_russian.vtt'
|
|
60
56
|
}
|
|
61
57
|
]
|
|
62
58
|
}
|
|
@@ -67,52 +63,56 @@
|
|
|
67
63
|
var playlist = cld.videoPlayer('playlist');
|
|
68
64
|
|
|
69
65
|
var source1 = {
|
|
70
|
-
publicId: 'stubhub',
|
|
66
|
+
publicId: 'video-player/stubhub',
|
|
71
67
|
info: { title: 'Subtitles & Captions playlist' },
|
|
72
68
|
textTracks: {
|
|
73
69
|
captions: {
|
|
74
70
|
label: 'English captions',
|
|
75
71
|
language: 'en',
|
|
76
72
|
default: true,
|
|
77
|
-
url: 'https://res.cloudinary.com/
|
|
73
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636972013/video-player/vtt/Meetup_english.vtt'
|
|
78
74
|
},
|
|
79
75
|
subtitles: [
|
|
80
76
|
{
|
|
81
77
|
label: 'German subtitles',
|
|
82
78
|
language: 'de',
|
|
83
|
-
url: 'https://res.cloudinary.com/
|
|
79
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636970250/video-player/vtt/Meetup_german.vtt'
|
|
84
80
|
},
|
|
85
81
|
{
|
|
86
82
|
label: 'Russian subtitles',
|
|
87
83
|
language: 'ru',
|
|
88
|
-
url: 'https://res.cloudinary.com/
|
|
84
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636970275/video-player/vtt/Meetup_russian.vtt'
|
|
89
85
|
}
|
|
90
86
|
]
|
|
91
87
|
}
|
|
92
88
|
};
|
|
89
|
+
|
|
93
90
|
var source2 = {
|
|
94
|
-
publicId: 'outdoors',
|
|
91
|
+
publicId: 'video-player/outdoors',
|
|
95
92
|
info: { title: 'Outdoors', subtitle: 'Outdoors movie with captions' },
|
|
96
93
|
textTracks: {
|
|
97
94
|
captions: {
|
|
98
95
|
label: 'English captions',
|
|
99
96
|
language: 'en',
|
|
100
97
|
default: true,
|
|
101
|
-
url: 'https://res.cloudinary.com/demo/raw/upload/outdoors.vtt',
|
|
98
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636971261/video-player/vtt/outdoors.vtt',
|
|
102
99
|
}
|
|
103
100
|
}
|
|
104
101
|
};
|
|
102
|
+
|
|
105
103
|
var source3 = {
|
|
106
|
-
publicId: 'dog',
|
|
104
|
+
publicId: 'video-player/dog',
|
|
107
105
|
info: { title: 'Dog', subtitle: 'Video of a dog, no captions' }
|
|
108
106
|
};
|
|
109
107
|
|
|
110
108
|
var playlistSources = [source1, source2, source3];
|
|
109
|
+
|
|
111
110
|
var playlistOptions = {
|
|
112
111
|
autoAdvance: true,
|
|
113
112
|
repeat: true,
|
|
114
113
|
presentUpcoming: 8
|
|
115
114
|
};
|
|
115
|
+
|
|
116
116
|
playlist.playlist(playlistSources, playlistOptions);
|
|
117
117
|
|
|
118
118
|
}, false);
|
|
@@ -183,25 +183,25 @@
|
|
|
183
183
|
var player = cld.videoPlayer('player');
|
|
184
184
|
|
|
185
185
|
player.source(
|
|
186
|
-
'stubhub',
|
|
186
|
+
'video-player/stubhub',
|
|
187
187
|
{
|
|
188
188
|
textTracks: {
|
|
189
189
|
captions: {
|
|
190
190
|
label: 'English captions',
|
|
191
191
|
language: 'en',
|
|
192
192
|
default: true,
|
|
193
|
-
url: 'https://res.cloudinary.com/
|
|
193
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636972013/video-player/vtt/Meetup_english.vtt'
|
|
194
194
|
},
|
|
195
195
|
subtitles: [
|
|
196
196
|
{
|
|
197
197
|
label: 'German subtitles',
|
|
198
198
|
language: 'de',
|
|
199
|
-
url: 'https://res.cloudinary.com/
|
|
199
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636970250/video-player/vtt/Meetup_german.vtt'
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
label: 'Russian subtitles',
|
|
203
203
|
language: 'ru',
|
|
204
|
-
url: 'https://res.cloudinary.com/
|
|
204
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636970275/video-player/vtt/Meetup_russian.vtt'
|
|
205
205
|
}
|
|
206
206
|
]
|
|
207
207
|
}
|
|
@@ -212,52 +212,56 @@
|
|
|
212
212
|
var playlist = cld.videoPlayer('playlist');
|
|
213
213
|
|
|
214
214
|
var source1 = {
|
|
215
|
-
publicId: 'stubhub',
|
|
215
|
+
publicId: 'video-player/stubhub',
|
|
216
216
|
info: { title: 'Subtitles & Captions playlist' },
|
|
217
217
|
textTracks: {
|
|
218
218
|
captions: {
|
|
219
219
|
label: 'English captions',
|
|
220
220
|
language: 'en',
|
|
221
221
|
default: true,
|
|
222
|
-
url: 'https://res.cloudinary.com/
|
|
222
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636972013/video-player/vtt/Meetup_english.vtt'
|
|
223
223
|
},
|
|
224
224
|
subtitles: [
|
|
225
225
|
{
|
|
226
226
|
label: 'German subtitles',
|
|
227
227
|
language: 'de',
|
|
228
|
-
url: 'https://res.cloudinary.com/
|
|
228
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636970250/video-player/vtt/Meetup_german.vtt'
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
label: 'Russian subtitles',
|
|
232
232
|
language: 'ru',
|
|
233
|
-
url: 'https://res.cloudinary.com/
|
|
233
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636970275/video-player/vtt/Meetup_russian.vtt'
|
|
234
234
|
}
|
|
235
235
|
]
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
|
+
|
|
238
239
|
var source2 = {
|
|
239
|
-
publicId: 'outdoors',
|
|
240
|
+
publicId: 'video-player/outdoors',
|
|
240
241
|
info: { title: 'Outdoors', subtitle: 'Outdoors movie with captions' },
|
|
241
242
|
textTracks: {
|
|
242
243
|
captions: {
|
|
243
244
|
label: 'English captions',
|
|
244
245
|
language: 'en',
|
|
245
246
|
default: true,
|
|
246
|
-
url: 'https://res.cloudinary.com/demo/raw/upload/outdoors.vtt',
|
|
247
|
+
url: 'https://res.cloudinary.com/demo/raw/upload/v1636971261/video-player/vtt/outdoors.vtt',
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
250
|
};
|
|
251
|
+
|
|
250
252
|
var source3 = {
|
|
251
|
-
publicId: 'dog',
|
|
253
|
+
publicId: 'video-player/dog',
|
|
252
254
|
info: { title: 'Dog', subtitle: 'Video of a dog, no captions' }
|
|
253
255
|
};
|
|
254
256
|
|
|
255
257
|
var playlistSources = [source1, source2, source3];
|
|
258
|
+
|
|
256
259
|
var playlistOptions = {
|
|
257
260
|
autoAdvance: true,
|
|
258
261
|
repeat: true,
|
|
259
262
|
presentUpcoming: 8
|
|
260
263
|
};
|
|
264
|
+
|
|
261
265
|
playlist.playlist(playlistSources, playlistOptions);
|
|
262
266
|
</code>
|
|
263
267
|
</pre>
|
package/package.json
CHANGED
|
@@ -299,7 +299,7 @@ Html5DashJS.hooks_ = {};
|
|
|
299
299
|
|
|
300
300
|
const canHandleKeySystems = function(source) {
|
|
301
301
|
// copy the source
|
|
302
|
-
source =
|
|
302
|
+
source = JSON.parse(JSON.stringify(source));
|
|
303
303
|
|
|
304
304
|
if (Html5DashJS.updateSourceData) {
|
|
305
305
|
videojs.log.warn('updateSourceData has been deprecated.' +
|