samvera_hls 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/samvera_hls/version.rb +1 -1
  3. data/vendor/assets/flash/mediaelement-flash-audio-ogg.swf +0 -0
  4. data/vendor/assets/flash/mediaelement-flash-audio.swf +0 -0
  5. data/vendor/assets/flash/mediaelement-flash-video-hls.swf +0 -0
  6. data/vendor/assets/flash/mediaelement-flash-video-mdash.swf +0 -0
  7. data/vendor/assets/flash/mediaelement-flash-video.swf +0 -0
  8. data/vendor/assets/images/mejs-controls.png +0 -0
  9. data/vendor/assets/images/mejs-controls.svg +1 -0
  10. data/vendor/assets/images/playlist-controls.svg +52 -0
  11. data/vendor/assets/javascripts/lang/ca.js +89 -0
  12. data/vendor/assets/javascripts/lang/cs.js +90 -0
  13. data/vendor/assets/javascripts/lang/de.js +90 -0
  14. data/vendor/assets/javascripts/lang/es.js +90 -0
  15. data/vendor/assets/javascripts/lang/fa.js +90 -0
  16. data/vendor/assets/javascripts/lang/fr.js +91 -0
  17. data/vendor/assets/javascripts/lang/hr.js +87 -0
  18. data/vendor/assets/javascripts/lang/hu.js +90 -0
  19. data/vendor/assets/javascripts/lang/it.js +90 -0
  20. data/vendor/assets/javascripts/lang/ja.js +90 -0
  21. data/vendor/assets/javascripts/lang/ko.js +90 -0
  22. data/vendor/assets/javascripts/lang/nl.js +91 -0
  23. data/vendor/assets/javascripts/lang/pl.js +90 -0
  24. data/vendor/assets/javascripts/lang/pt.js +92 -0
  25. data/vendor/assets/javascripts/lang/ro.js +90 -0
  26. data/vendor/assets/javascripts/lang/ru.js +90 -0
  27. data/vendor/assets/javascripts/lang/sk.js +90 -0
  28. data/vendor/assets/javascripts/lang/sv.js +89 -0
  29. data/vendor/assets/javascripts/lang/uk.js +89 -0
  30. data/vendor/assets/javascripts/lang/zh-cn.js +90 -0
  31. data/vendor/assets/javascripts/lang/zh.js +91 -0
  32. data/vendor/assets/javascripts/mediaelement-and-player.js +8497 -0
  33. data/vendor/assets/javascripts/playlist-i18n.js +149 -0
  34. data/vendor/assets/javascripts/playlist.js +348 -0
  35. data/vendor/assets/javascripts/renderers/dailymotion.js +415 -0
  36. data/vendor/assets/javascripts/renderers/dailymotion.min.js +12 -0
  37. data/vendor/assets/javascripts/renderers/facebook.js +361 -0
  38. data/vendor/assets/javascripts/renderers/facebook.min.js +12 -0
  39. data/vendor/assets/javascripts/renderers/soundcloud.js +306 -0
  40. data/vendor/assets/javascripts/renderers/soundcloud.min.js +12 -0
  41. data/vendor/assets/javascripts/renderers/twitch.js +374 -0
  42. data/vendor/assets/javascripts/renderers/twitch.min.js +12 -0
  43. data/vendor/assets/javascripts/renderers/vimeo.js +411 -0
  44. data/vendor/assets/javascripts/renderers/vimeo.min.js +12 -0
  45. data/vendor/assets/stylesheets/mediaelementplayer-legacy.css.erb +774 -0
  46. data/vendor/assets/stylesheets/mediaelementplayer.css.erb +774 -0
  47. data/vendor/assets/stylesheets/playlist.css.erb +229 -0
  48. metadata +46 -1
@@ -0,0 +1,415 @@
1
+ /*!
2
+ * MediaElement.js
3
+ * http://www.mediaelementjs.com/
4
+ *
5
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
6
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
7
+ *
8
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
9
+ * License: MIT
10
+ *
11
+ */(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
12
+ 'use strict';
13
+
14
+ var DailyMotionApi = {
15
+ isSDKStarted: false,
16
+
17
+ isSDKLoaded: false,
18
+
19
+ iframeQueue: [],
20
+
21
+ enqueueIframe: function enqueueIframe(settings) {
22
+
23
+ if (DailyMotionApi.isLoaded) {
24
+ DailyMotionApi.createIframe(settings);
25
+ } else {
26
+ DailyMotionApi.loadIframeApi();
27
+ DailyMotionApi.iframeQueue.push(settings);
28
+ }
29
+ },
30
+
31
+ loadIframeApi: function loadIframeApi() {
32
+ if (!DailyMotionApi.isSDKStarted) {
33
+ mejs.Utils.loadScript('https://api.dmcdn.net/all.js');
34
+ DailyMotionApi.isSDKStarted = true;
35
+ }
36
+ },
37
+
38
+ apiReady: function apiReady() {
39
+
40
+ DailyMotionApi.isLoaded = true;
41
+ DailyMotionApi.isSDKLoaded = true;
42
+
43
+ while (DailyMotionApi.iframeQueue.length > 0) {
44
+ var settings = DailyMotionApi.iframeQueue.pop();
45
+
46
+ DM.init({
47
+ apiKey: settings.apiKey,
48
+ status: settings.status,
49
+ cookie: settings.cookie
50
+ });
51
+
52
+ DailyMotionApi.createIframe(settings);
53
+ }
54
+ },
55
+
56
+ createIframe: function createIframe(settings) {
57
+
58
+ var player = DM.player(settings.container, {
59
+ height: settings.height || '100%',
60
+ width: settings.width || '100%',
61
+ video: settings.videoId,
62
+ params: Object.assign({ api: true }, settings.params),
63
+ origin: location.host
64
+ });
65
+
66
+ player.addEventListener('apiready', function () {
67
+ window['__ready__' + settings.id](player, { paused: true, ended: false });
68
+ });
69
+ },
70
+
71
+ getDailyMotionId: function getDailyMotionId(url) {
72
+ var parts = url.split('/'),
73
+ lastPart = parts[parts.length - 1],
74
+ dashParts = lastPart.split('_');
75
+
76
+ return dashParts[0];
77
+ }
78
+ };
79
+
80
+ var DailyMotionIframeRenderer = {
81
+ name: 'dailymotion_iframe',
82
+ options: {
83
+ prefix: 'dailymotion_iframe',
84
+ dailymotion: {
85
+ width: '100%',
86
+ height: '100%',
87
+ params: {
88
+ autoplay: false,
89
+ chromeless: 1,
90
+ info: 0,
91
+ logo: 0,
92
+ related: 0
93
+ },
94
+ apiKey: null,
95
+ status: true,
96
+ cookie: true
97
+ }
98
+ },
99
+
100
+ canPlayType: function canPlayType(type) {
101
+ return ~['video/dailymotion', 'video/x-dailymotion'].indexOf(type.toLowerCase());
102
+ },
103
+
104
+ create: function create(mediaElement, options, mediaFiles) {
105
+
106
+ var dm = {},
107
+ apiStack = [],
108
+ readyState = 4;
109
+
110
+ var events = void 0,
111
+ dmPlayer = null,
112
+ dmIframe = null,
113
+ muted = mediaElement.originalNode.muted;
114
+
115
+ dm.options = options;
116
+ dm.id = mediaElement.id + '_' + options.prefix;
117
+ dm.mediaElement = mediaElement;
118
+
119
+ var props = mejs.html5media.properties,
120
+ assignGettersSetters = function assignGettersSetters(propName) {
121
+
122
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
123
+
124
+ dm['get' + capName] = function () {
125
+ if (dmPlayer !== null) {
126
+ var value = null;
127
+
128
+ switch (propName) {
129
+ case 'currentTime':
130
+ return dmPlayer.currentTime;
131
+ case 'duration':
132
+ return isNaN(dmPlayer.duration) ? 0 : dmPlayer.duration;
133
+ case 'volume':
134
+ return dmPlayer.volume;
135
+ case 'paused':
136
+ return dmPlayer.paused;
137
+ case 'ended':
138
+ return dmPlayer.ended;
139
+ case 'muted':
140
+ muted = dmPlayer.muted;
141
+ return muted;
142
+ case 'buffered':
143
+ var percentLoaded = dmPlayer.bufferedTime,
144
+ duration = dmPlayer.duration;
145
+ return {
146
+ start: function start() {
147
+ return 0;
148
+ },
149
+ end: function end() {
150
+ return percentLoaded / duration;
151
+ },
152
+ length: 1
153
+ };
154
+ case 'src':
155
+ return mediaElement.originalNode.getAttribute('src');
156
+ case 'readyState':
157
+ return readyState;
158
+ }
159
+
160
+ return value;
161
+ } else {
162
+ return null;
163
+ }
164
+ };
165
+
166
+ dm['set' + capName] = function (value) {
167
+ if (dmPlayer !== null) {
168
+ switch (propName) {
169
+ case 'src':
170
+ var url = typeof value === 'string' ? value : value[0].src;
171
+ dmPlayer.load(DailyMotionApi.getDailyMotionId(url));
172
+ break;
173
+ case 'currentTime':
174
+ dmPlayer.seek(value);
175
+ break;
176
+ case 'muted':
177
+ if (value === true) {
178
+ dmPlayer.setVolume(0);
179
+ }
180
+ dmPlayer.setMuted(value);
181
+ muted = value;
182
+ setTimeout(function () {
183
+ var event = mejs.Utils.createEvent('volumechange', dm);
184
+ mediaElement.dispatchEvent(event);
185
+ }, 50);
186
+ break;
187
+ case 'volume':
188
+ dmPlayer.setVolume(value);
189
+ if (value === 0 && !dmPlayer.muted) {
190
+ dmPlayer.setMuted(true);
191
+ muted = true;
192
+ } else if (value > 0 && dmPlayer.muted) {
193
+ dmPlayer.setMuted(false);
194
+ muted = false;
195
+ }
196
+
197
+ setTimeout(function () {
198
+ var event = mejs.Utils.createEvent('volumechange', dm);
199
+ mediaElement.dispatchEvent(event);
200
+ }, 50);
201
+ break;
202
+ case 'readyState':
203
+ var event = mejs.Utils.createEvent('canplay', dm);
204
+ mediaElement.dispatchEvent(event);
205
+ break;
206
+ default:
207
+
208
+ break;
209
+ }
210
+ } else {
211
+ apiStack.push({ type: 'set', propName: propName, value: value });
212
+ }
213
+ };
214
+ };
215
+
216
+ for (var i = 0, total = props.length; i < total; i++) {
217
+ assignGettersSetters(props[i]);
218
+ }
219
+
220
+ var methods = mejs.html5media.methods,
221
+ assignMethods = function assignMethods(methodName) {
222
+ dm[methodName] = function () {
223
+ if (dmPlayer !== null) {
224
+ switch (methodName) {
225
+ case 'play':
226
+ return dmPlayer.play();
227
+ case 'pause':
228
+ return dmPlayer.pause();
229
+ case 'load':
230
+ return null;
231
+ }
232
+ } else {
233
+ apiStack.push({ type: 'call', methodName: methodName });
234
+ }
235
+ };
236
+ };
237
+
238
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
239
+ assignMethods(methods[_i]);
240
+ }
241
+
242
+ window['__ready__' + dm.id] = function (_dmPlayer) {
243
+
244
+ mediaElement.dmPlayer = dmPlayer = _dmPlayer;
245
+
246
+ if (apiStack.length) {
247
+ for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {
248
+
249
+ var stackItem = apiStack[_i2];
250
+
251
+ if (stackItem.type === 'set') {
252
+ var propName = stackItem.propName,
253
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
254
+
255
+ dm['set' + capName](stackItem.value);
256
+ } else if (stackItem.type === 'call') {
257
+ dm[stackItem.methodName]();
258
+ }
259
+ }
260
+ }
261
+
262
+ dmIframe = document.getElementById(dm.id);
263
+
264
+ events = ['mouseover', 'mouseout'];
265
+ var assignEvents = function assignEvents(e) {
266
+ var event = mejs.Utils.createEvent(e.type, dm);
267
+ mediaElement.dispatchEvent(event);
268
+ };
269
+
270
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
271
+ dmIframe.addEventListener(events[_i3], assignEvents, false);
272
+ }
273
+
274
+ if (mediaElement.originalNode.muted) {
275
+ dmPlayer.setVolume(0);
276
+ dmPlayer.setMuted(true);
277
+ } else {
278
+ dmPlayer.setVolume(dmPlayer.volume);
279
+ dmPlayer.setMuted(false);
280
+ }
281
+
282
+ events = mejs.html5media.events;
283
+ events = events.concat(['click', 'mouseover', 'mouseout']);
284
+ var assignNativeEvents = function assignNativeEvents(eventName) {
285
+ if (eventName !== 'ended') {
286
+ dmPlayer.addEventListener(eventName, function (e) {
287
+ var event = mejs.Utils.createEvent(e.type, dm);
288
+ mediaElement.dispatchEvent(event);
289
+ });
290
+ }
291
+ };
292
+
293
+ for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) {
294
+ assignNativeEvents(events[_i4]);
295
+ }
296
+
297
+ dmPlayer.addEventListener('ad_start', function () {
298
+ var event = mejs.Utils.createEvent('play', dm);
299
+ mediaElement.dispatchEvent(event);
300
+
301
+ event = mejs.Utils.createEvent('progress', dm);
302
+ mediaElement.dispatchEvent(event);
303
+
304
+ event = mejs.Utils.createEvent('timeupdate', dm);
305
+ mediaElement.dispatchEvent(event);
306
+ });
307
+ dmPlayer.addEventListener('ad_timeupdate', function () {
308
+ var event = mejs.Utils.createEvent('timeupdate', dm);
309
+ mediaElement.dispatchEvent(event);
310
+ });
311
+ dmPlayer.addEventListener('ad_pause', function () {
312
+ var event = mejs.Utils.createEvent('pause', dm);
313
+ mediaElement.dispatchEvent(event);
314
+ });
315
+ dmPlayer.addEventListener('start', function () {
316
+ if (dmPlayer.muted) {
317
+ var event = mejs.Utils.createEvent('volumechange', dm);
318
+ mediaElement.dispatchEvent(event);
319
+ }
320
+ });
321
+ dmPlayer.addEventListener('video_start', function () {
322
+ var event = mejs.Utils.createEvent('play', dm);
323
+ mediaElement.dispatchEvent(event);
324
+
325
+ var playingEvent = mejs.Utils.createEvent('playing', dm);
326
+ mediaElement.dispatchEvent(playingEvent);
327
+ });
328
+ dmPlayer.addEventListener('ad_timeupdate', function () {
329
+ var event = mejs.Utils.createEvent('timeupdate', dm);
330
+ mediaElement.dispatchEvent(event);
331
+ });
332
+ dmPlayer.addEventListener('video_end', function () {
333
+ var event = mejs.Utils.createEvent('ended', dm);
334
+ mediaElement.dispatchEvent(event);
335
+
336
+ if (mediaElement.originalNode.getAttribute('loop')) {
337
+ dmPlayer.play();
338
+ }
339
+ });
340
+
341
+ var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];
342
+
343
+ for (var _i5 = 0, _total5 = initEvents.length; _i5 < _total5; _i5++) {
344
+ var event = mejs.Utils.createEvent(initEvents[_i5], dm);
345
+ mediaElement.dispatchEvent(event);
346
+ }
347
+ };
348
+
349
+ var dmContainer = document.createElement('div');
350
+ dmContainer.id = dm.id;
351
+ mediaElement.appendChild(dmContainer);
352
+ if (mediaElement.originalNode) {
353
+ dmContainer.style.width = mediaElement.originalNode.style.width;
354
+ dmContainer.style.height = mediaElement.originalNode.style.height;
355
+ }
356
+ mediaElement.originalNode.style.display = 'none';
357
+
358
+ var videoId = DailyMotionApi.getDailyMotionId(mediaFiles[0].src),
359
+ dmSettings = {
360
+ id: dm.id,
361
+ container: dmContainer,
362
+ videoId: videoId
363
+ };
364
+
365
+ dmSettings.params = Object.assign({}, dm.options.dailymotion);
366
+
367
+ dmSettings.params.controls = !!mediaElement.originalNode.controls;
368
+
369
+ if (mediaElement.originalNode.autoplay) {
370
+ dmSettings.params.autoplay = true;
371
+ }
372
+ if (mediaElement.originalNode.muted) {
373
+ dmSettings.params.mute = true;
374
+ }
375
+ dmSettings.params.api = '1';
376
+
377
+ DailyMotionApi.enqueueIframe(dmSettings);
378
+
379
+ dm.hide = function () {
380
+ dm.pause();
381
+ if (dmIframe) {
382
+ dmIframe.style.display = 'none';
383
+ }
384
+ };
385
+ dm.show = function () {
386
+ if (dmIframe) {
387
+ dmIframe.style.display = '';
388
+ }
389
+ };
390
+ dm.setSize = function (width, height) {
391
+ if (dmIframe) {
392
+ dmIframe.width = width;
393
+ dmIframe.height = height;
394
+ }
395
+ };
396
+ dm.destroy = function () {
397
+ dmPlayer.destroy();
398
+ };
399
+
400
+ return dm;
401
+ }
402
+ };
403
+
404
+ mejs.Utils.typeChecks.push(function (url) {
405
+ return (/\/\/((www\.)?dailymotion\.com|dai\.ly)/i.test(url) ? 'video/x-dailymotion' : null
406
+ );
407
+ });
408
+
409
+ window.dmAsyncInit = function () {
410
+ DailyMotionApi.apiReady();
411
+ };
412
+
413
+ mejs.Renderers.add(DailyMotionIframeRenderer);
414
+
415
+ },{}]},{},[1]);
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * MediaElement.js
3
+ * http://www.mediaelementjs.com/
4
+ *
5
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
6
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
7
+ *
8
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
9
+ * License: MIT
10
+ *
11
+ */
12
+ !function e(t,a,n){function i(s,o){if(!a[s]){if(!t[s]){var d="function"==typeof require&&require;if(!o&&d)return d(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=a[s]={exports:{}};t[s][0].call(l.exports,function(e){var a=t[s][1][e];return i(a||e)},l,l.exports,e,t,a,n)}return a[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,a){"use strict";var n={isSDKStarted:!1,isSDKLoaded:!1,iframeQueue:[],enqueueIframe:function(e){n.isLoaded?n.createIframe(e):(n.loadIframeApi(),n.iframeQueue.push(e))},loadIframeApi:function(){n.isSDKStarted||(mejs.Utils.loadScript("https://api.dmcdn.net/all.js"),n.isSDKStarted=!0)},apiReady:function(){for(n.isLoaded=!0,n.isSDKLoaded=!0;n.iframeQueue.length>0;){var e=n.iframeQueue.pop();DM.init({apiKey:e.apiKey,status:e.status,cookie:e.cookie}),n.createIframe(e)}},createIframe:function(e){var t=DM.player(e.container,{height:e.height||"100%",width:e.width||"100%",video:e.videoId,params:Object.assign({api:!0},e.params),origin:location.host});t.addEventListener("apiready",function(){window["__ready__"+e.id](t,{paused:!0,ended:!1})})},getDailyMotionId:function(e){var t=e.split("/");return t[t.length-1].split("_")[0]}},i={name:"dailymotion_iframe",options:{prefix:"dailymotion_iframe",dailymotion:{width:"100%",height:"100%",params:{autoplay:!1,chromeless:1,info:0,logo:0,related:0},apiKey:null,status:!0,cookie:!0}},canPlayType:function(e){return~["video/dailymotion","video/x-dailymotion"].indexOf(e.toLowerCase())},create:function(e,t,a){var i={},r=[],s=void 0,o=null,d=null,u=e.originalNode.muted;i.options=t,i.id=e.id+"_"+t.prefix,i.mediaElement=e;for(var l=mejs.html5media.properties,c=0,m=l.length;c<m;c++)!function(t){var a=""+t.substring(0,1).toUpperCase()+t.substring(1);i["get"+a]=function(){if(null!==o){switch(t){case"currentTime":return o.currentTime;case"duration":return isNaN(o.duration)?0:o.duration;case"volume":return o.volume;case"paused":return o.paused;case"ended":return o.ended;case"muted":return u=o.muted;case"buffered":var a=o.bufferedTime,n=o.duration;return{start:function(){return 0},end:function(){return a/n},length:1};case"src":return e.originalNode.getAttribute("src");case"readyState":return 4}return null}return null},i["set"+a]=function(a){if(null!==o)switch(t){case"src":var s="string"==typeof a?a:a[0].src;o.load(n.getDailyMotionId(s));break;case"currentTime":o.seek(a);break;case"muted":!0===a&&o.setVolume(0),o.setMuted(a),u=a,setTimeout(function(){var t=mejs.Utils.createEvent("volumechange",i);e.dispatchEvent(t)},50);break;case"volume":o.setVolume(a),0!==a||o.muted?a>0&&o.muted&&(o.setMuted(!1),u=!1):(o.setMuted(!0),u=!0),setTimeout(function(){var t=mejs.Utils.createEvent("volumechange",i);e.dispatchEvent(t)},50);break;case"readyState":var d=mejs.Utils.createEvent("canplay",i);e.dispatchEvent(d)}else r.push({type:"set",propName:t,value:a})}}(l[c]);for(var p=mejs.html5media.methods,v=0,f=p.length;v<f;v++)!function(e){i[e]=function(){if(null!==o)switch(e){case"play":return o.play();case"pause":return o.pause();case"load":return null}else r.push({type:"call",methodName:e})}}(p[v]);window["__ready__"+i.id]=function(t){if(e.dmPlayer=o=t,r.length)for(var a=0,n=r.length;a<n;a++){var u=r[a];if("set"===u.type){var l=u.propName,c=""+l.substring(0,1).toUpperCase()+l.substring(1);i["set"+c](u.value)}else"call"===u.type&&i[u.methodName]()}d=document.getElementById(i.id);for(var m=0,p=(s=["mouseover","mouseout"]).length;m<p;m++)d.addEventListener(s[m],function(t){var a=mejs.Utils.createEvent(t.type,i);e.dispatchEvent(a)},!1);e.originalNode.muted?(o.setVolume(0),o.setMuted(!0)):(o.setVolume(o.volume),o.setMuted(!1)),s=mejs.html5media.events;for(var v=0,f=(s=s.concat(["click","mouseover","mouseout"])).length;v<f;v++)!function(t){"ended"!==t&&o.addEventListener(t,function(t){var a=mejs.Utils.createEvent(t.type,i);e.dispatchEvent(a)})}(s[v]);o.addEventListener("ad_start",function(){var t=mejs.Utils.createEvent("play",i);e.dispatchEvent(t),t=mejs.Utils.createEvent("progress",i),e.dispatchEvent(t),t=mejs.Utils.createEvent("timeupdate",i),e.dispatchEvent(t)}),o.addEventListener("ad_timeupdate",function(){var t=mejs.Utils.createEvent("timeupdate",i);e.dispatchEvent(t)}),o.addEventListener("ad_pause",function(){var t=mejs.Utils.createEvent("pause",i);e.dispatchEvent(t)}),o.addEventListener("start",function(){if(o.muted){var t=mejs.Utils.createEvent("volumechange",i);e.dispatchEvent(t)}}),o.addEventListener("video_start",function(){var t=mejs.Utils.createEvent("play",i);e.dispatchEvent(t);var a=mejs.Utils.createEvent("playing",i);e.dispatchEvent(a)}),o.addEventListener("ad_timeupdate",function(){var t=mejs.Utils.createEvent("timeupdate",i);e.dispatchEvent(t)}),o.addEventListener("video_end",function(){var t=mejs.Utils.createEvent("ended",i);e.dispatchEvent(t),e.originalNode.getAttribute("loop")&&o.play()});for(var h=["rendererready","loadedmetadata","loadeddata","canplay"],y=0,g=h.length;y<g;y++){var E=mejs.Utils.createEvent(h[y],i);e.dispatchEvent(E)}};var h=document.createElement("div");h.id=i.id,e.appendChild(h),e.originalNode&&(h.style.width=e.originalNode.style.width,h.style.height=e.originalNode.style.height),e.originalNode.style.display="none";var y=n.getDailyMotionId(a[0].src),g={id:i.id,container:h,videoId:y};return g.params=Object.assign({},i.options.dailymotion),g.params.controls=!!e.originalNode.controls,e.originalNode.autoplay&&(g.params.autoplay=!0),e.originalNode.muted&&(g.params.mute=!0),g.params.api="1",n.enqueueIframe(g),i.hide=function(){i.pause(),d&&(d.style.display="none")},i.show=function(){d&&(d.style.display="")},i.setSize=function(e,t){d&&(d.width=e,d.height=t)},i.destroy=function(){o.destroy()},i}};mejs.Utils.typeChecks.push(function(e){return/\/\/((www\.)?dailymotion\.com|dai\.ly)/i.test(e)?"video/x-dailymotion":null}),window.dmAsyncInit=function(){n.apiReady()},mejs.Renderers.add(i)},{}]},{},[1]);