cloudinary-video-player 2.0.5 → 2.1.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/dist/chapters.js +7 -7
- package/dist/chapters.light.js +7 -7
- package/dist/chapters.light.min.js +1 -1
- package/dist/chapters.min.js +1 -1
- package/dist/cld-video-player.css +5 -5
- package/dist/cld-video-player.js +3852 -1479
- package/dist/cld-video-player.light.css +5 -5
- package/dist/cld-video-player.light.js +2495 -901
- package/dist/cld-video-player.light.min.css +1 -1
- package/dist/cld-video-player.light.min.js +1 -1
- package/dist/cld-video-player.light.min.js.LICENSE.txt +1 -5
- package/dist/cld-video-player.min.css +1 -1
- package/dist/cld-video-player.min.js +1 -1
- package/dist/cld-video-player.min.js.LICENSE.txt +1 -5
- package/dist/debug.js +11 -11
- package/dist/debug.light.js +11 -11
- package/dist/debug.light.min.js +1 -1
- package/dist/debug.min.js +1 -1
- package/dist/ima.js +21 -9
- package/dist/ima.light.js +21 -9
- package/dist/ima.light.min.js +1 -1
- package/dist/ima.min.js +1 -1
- package/dist/interaction-areas.js +28 -28
- package/dist/interaction-areas.light.js +28 -28
- package/dist/interaction-areas.light.min.js +1 -1
- package/dist/interaction-areas.min.js +1 -1
- package/dist/playlist.js +40 -44
- package/dist/playlist.light.js +40 -44
- package/dist/playlist.light.min.js +1 -1
- package/dist/playlist.min.js +1 -1
- package/dist/recommendations-overlay.js +2 -2
- package/dist/recommendations-overlay.light.js +2 -2
- package/dist/recommendations-overlay.light.min.js +1 -1
- package/dist/recommendations-overlay.min.js +1 -1
- package/dist/shoppable.js +60 -50
- package/dist/shoppable.light.js +60 -50
- package/dist/shoppable.light.min.js +1 -1
- package/dist/shoppable.min.js +1 -1
- package/lib/all.js +1 -1
- package/lib/all.js.LICENSE.txt +1 -5
- package/lib/chapters.js +1 -1
- package/lib/cld-video-player.js +1 -1
- package/lib/cld-video-player.js.LICENSE.txt +1 -5
- package/lib/cld-video-player.min.css +2 -2
- package/lib/debug.js +1 -1
- package/lib/ima.js +1 -1
- package/lib/interaction-areas.js +1 -1
- package/lib/player.js +3 -0
- package/lib/player.js.LICENSE.txt +19 -0
- package/lib/playlist.js +1 -1
- package/lib/recommendations-overlay.js +1 -1
- package/lib/shoppable.js +1 -1
- package/lib/videoPlayer.js +1 -1
- package/lib/videoPlayer.js.LICENSE.txt +1 -5
- package/lib/videoPlayerWithProfile.js +1 -1
- package/lib/videoPlayerWithProfile.js.LICENSE.txt +1 -5
- package/package.json +32 -32
|
@@ -40,7 +40,7 @@ const themedButton = _ref => {
|
|
|
40
40
|
return (0,_utils_dom__WEBPACK_IMPORTED_MODULE_0__.elementsCreator)({
|
|
41
41
|
tag: 'button',
|
|
42
42
|
attr: {
|
|
43
|
-
class:
|
|
43
|
+
class: `vp-theme-button theme-${theme}`
|
|
44
44
|
},
|
|
45
45
|
onClick,
|
|
46
46
|
children: [{
|
|
@@ -49,7 +49,7 @@ const themedButton = _ref => {
|
|
|
49
49
|
class: 'vp-loading-bar'
|
|
50
50
|
},
|
|
51
51
|
style: {
|
|
52
|
-
'animation-duration':
|
|
52
|
+
'animation-duration': `${loadingDelay}ms`
|
|
53
53
|
}
|
|
54
54
|
}, {
|
|
55
55
|
tag: 'div',
|
|
@@ -385,7 +385,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
385
385
|
|
|
386
386
|
|
|
387
387
|
|
|
388
|
-
const getInteractionAreaItemId = (item, index) => item.id || item.type ||
|
|
388
|
+
const getInteractionAreaItemId = (item, index) => item.id || item.type || `id_${index}`;
|
|
389
389
|
const getInteractionAreaItem = (_ref, item, index, durationTime, onClick) => {
|
|
390
390
|
let {
|
|
391
391
|
playerOptions,
|
|
@@ -399,15 +399,15 @@ const getInteractionAreaItem = (_ref, item, index, durationTime, onClick) => {
|
|
|
399
399
|
return (0,_utils_dom__WEBPACK_IMPORTED_MODULE_2__.elementsCreator)({
|
|
400
400
|
tag: 'div',
|
|
401
401
|
attr: {
|
|
402
|
-
class:
|
|
402
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-item theme-${theme}`,
|
|
403
403
|
'data-id': getInteractionAreaItemId(item, index)
|
|
404
404
|
},
|
|
405
405
|
style: {
|
|
406
|
-
left:
|
|
407
|
-
top:
|
|
408
|
-
width:
|
|
409
|
-
height:
|
|
410
|
-
transitionDuration:
|
|
406
|
+
left: `${item.left}%`,
|
|
407
|
+
top: `${item.top}%`,
|
|
408
|
+
width: `${item.width}%`,
|
|
409
|
+
height: `${item.height}%`,
|
|
410
|
+
transitionDuration: `${durationTime}ms`
|
|
411
411
|
},
|
|
412
412
|
event: {
|
|
413
413
|
name: 'click',
|
|
@@ -416,12 +416,12 @@ const getInteractionAreaItem = (_ref, item, index, durationTime, onClick) => {
|
|
|
416
416
|
children: [{
|
|
417
417
|
tag: 'div',
|
|
418
418
|
attr: {
|
|
419
|
-
class:
|
|
419
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-area-marker`
|
|
420
420
|
},
|
|
421
421
|
children: [{
|
|
422
422
|
tag: 'div',
|
|
423
423
|
attr: {
|
|
424
|
-
class:
|
|
424
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-marker-shadow`
|
|
425
425
|
},
|
|
426
426
|
style: {
|
|
427
427
|
[theme === _interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_THEME.SHADOWED ? 'backgroundColor' : 'borderColor']: accentColor
|
|
@@ -429,7 +429,7 @@ const getInteractionAreaItem = (_ref, item, index, durationTime, onClick) => {
|
|
|
429
429
|
}, {
|
|
430
430
|
tag: 'div',
|
|
431
431
|
attr: {
|
|
432
|
-
class:
|
|
432
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-marker-main`
|
|
433
433
|
},
|
|
434
434
|
style: {
|
|
435
435
|
borderColor: accentColor
|
|
@@ -471,7 +471,7 @@ const setInteractionAreasContainer = (videojs, newInteractionAreasContainer) =>
|
|
|
471
471
|
videojs.el().appendChild(newInteractionAreasContainer);
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
|
-
const getInteractionAreaElementById = (interactionAreasContainer, item, index) => interactionAreasContainer.querySelector(
|
|
474
|
+
const getInteractionAreaElementById = (interactionAreasContainer, item, index) => interactionAreasContainer.querySelector(`[data-id=${getInteractionAreaItemId(item, index)}]`);
|
|
475
475
|
const updateInteractionAreasItem = (videojs, configs, interactionAreasData, previousInteractionAreasData, durationTime, onClick) => {
|
|
476
476
|
const interactionAreasContainer = getInteractionAreasContainer(videojs);
|
|
477
477
|
interactionAreasData.forEach((item, index) => {
|
|
@@ -482,11 +482,11 @@ const updateInteractionAreasItem = (videojs, configs, interactionAreasData, prev
|
|
|
482
482
|
// in case the element of the item is in the dom and exist in the previous data , it update the element position
|
|
483
483
|
if (isExistItem && itemElement) {
|
|
484
484
|
(0,_utils_dom__WEBPACK_IMPORTED_MODULE_2__.styleElement)(itemElement, {
|
|
485
|
-
left:
|
|
486
|
-
top:
|
|
487
|
-
width:
|
|
488
|
-
height:
|
|
489
|
-
transitionDuration:
|
|
485
|
+
left: `${item.left}%`,
|
|
486
|
+
top: `${item.top}%`,
|
|
487
|
+
width: `${item.width}%`,
|
|
488
|
+
height: `${item.height}%`,
|
|
489
|
+
transitionDuration: `${durationTime}ms`
|
|
490
490
|
});
|
|
491
491
|
// if the element did not exist before , not in the dom and not in the previous data , it add a new element
|
|
492
492
|
} else if (!isExistItem && !itemElement) {
|
|
@@ -524,23 +524,23 @@ const onClickInteractionAreaLayoutClick = function (checked) {
|
|
|
524
524
|
const createInteractionAreaLayoutMessage = function (videojs, onClick) {
|
|
525
525
|
let showItAgainCheckbox = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
526
526
|
let checked = false;
|
|
527
|
-
const id =
|
|
527
|
+
const id = `checkbox_${Math.round(Math.random() * 10000)}`;
|
|
528
528
|
const tracksContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_2__.elementsCreator)({
|
|
529
529
|
tag: 'div',
|
|
530
530
|
attr: {
|
|
531
|
-
class:
|
|
531
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_CONTAINER_CLASS_NAME} ${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message ${showItAgainCheckbox ? '' : 'clickable'}`
|
|
532
532
|
},
|
|
533
533
|
onClick: !showItAgainCheckbox ? () => onClickInteractionAreaLayoutClick(checked, onClick) : null,
|
|
534
534
|
children: [{
|
|
535
535
|
tag: 'img',
|
|
536
536
|
attr: {
|
|
537
|
-
class:
|
|
537
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-icon`,
|
|
538
538
|
src: _interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREA_HAND_ICON
|
|
539
539
|
}
|
|
540
540
|
}, {
|
|
541
541
|
tag: 'h3',
|
|
542
542
|
attr: {
|
|
543
|
-
class:
|
|
543
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message-title`
|
|
544
544
|
},
|
|
545
545
|
children: 'Tap on dots to zoom for a product.'
|
|
546
546
|
}, (0,_components_themeButton_themedButton__WEBPACK_IMPORTED_MODULE_5__.themedButton)({
|
|
@@ -551,13 +551,13 @@ const createInteractionAreaLayoutMessage = function (videojs, onClick) {
|
|
|
551
551
|
}), showItAgainCheckbox && {
|
|
552
552
|
tag: 'div',
|
|
553
553
|
attr: {
|
|
554
|
-
class:
|
|
554
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message-do-not-show`
|
|
555
555
|
},
|
|
556
556
|
children: [{
|
|
557
557
|
tag: 'input',
|
|
558
558
|
attr: {
|
|
559
559
|
type: 'checkbox',
|
|
560
|
-
class:
|
|
560
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message-checkbox`,
|
|
561
561
|
id
|
|
562
562
|
},
|
|
563
563
|
event: {
|
|
@@ -569,7 +569,7 @@ const createInteractionAreaLayoutMessage = function (videojs, onClick) {
|
|
|
569
569
|
}, {
|
|
570
570
|
tag: 'label',
|
|
571
571
|
attr: {
|
|
572
|
-
class:
|
|
572
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message-checkbox-title`,
|
|
573
573
|
for: id
|
|
574
574
|
},
|
|
575
575
|
children: 'Don׳t show it again'
|
|
@@ -578,7 +578,7 @@ const createInteractionAreaLayoutMessage = function (videojs, onClick) {
|
|
|
578
578
|
});
|
|
579
579
|
setInteractionAreasContainer(videojs, tracksContainer);
|
|
580
580
|
};
|
|
581
|
-
const getInteractionAreasContainer = videojs => videojs.el().querySelector(
|
|
581
|
+
const getInteractionAreasContainer = videojs => videojs.el().querySelector(`.${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_CONTAINER_CLASS_NAME}`);
|
|
582
582
|
const removeInteractionAreasContainer = videojs => {
|
|
583
583
|
const interactionAreasContainer = getInteractionAreasContainer(videojs);
|
|
584
584
|
|
|
@@ -596,8 +596,8 @@ const setInteractionAreasContainerSize = (videojs, videoElement) => {
|
|
|
596
596
|
} = videoElement;
|
|
597
597
|
const videoAspectRatio = videoWidth / videoHeight;
|
|
598
598
|
const width = videoAspectRatio * videoElement.clientHeight;
|
|
599
|
-
interactionAreasContainer.style.width =
|
|
600
|
-
interactionAreasContainer.style.height = videoElement.clientWidth < width ?
|
|
599
|
+
interactionAreasContainer.style.width = `${videoElement.clientWidth < width ? '100%' : width}px`;
|
|
600
|
+
interactionAreasContainer.style.height = videoElement.clientWidth < width ? `${videoElement.clientWidth / videoAspectRatio}px` : '100%';
|
|
601
601
|
};
|
|
602
602
|
|
|
603
603
|
/***/ }),
|
|
@@ -40,7 +40,7 @@ const themedButton = _ref => {
|
|
|
40
40
|
return (0,_utils_dom__WEBPACK_IMPORTED_MODULE_0__.elementsCreator)({
|
|
41
41
|
tag: 'button',
|
|
42
42
|
attr: {
|
|
43
|
-
class:
|
|
43
|
+
class: `vp-theme-button theme-${theme}`
|
|
44
44
|
},
|
|
45
45
|
onClick,
|
|
46
46
|
children: [{
|
|
@@ -49,7 +49,7 @@ const themedButton = _ref => {
|
|
|
49
49
|
class: 'vp-loading-bar'
|
|
50
50
|
},
|
|
51
51
|
style: {
|
|
52
|
-
'animation-duration':
|
|
52
|
+
'animation-duration': `${loadingDelay}ms`
|
|
53
53
|
}
|
|
54
54
|
}, {
|
|
55
55
|
tag: 'div',
|
|
@@ -385,7 +385,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
385
385
|
|
|
386
386
|
|
|
387
387
|
|
|
388
|
-
const getInteractionAreaItemId = (item, index) => item.id || item.type ||
|
|
388
|
+
const getInteractionAreaItemId = (item, index) => item.id || item.type || `id_${index}`;
|
|
389
389
|
const getInteractionAreaItem = (_ref, item, index, durationTime, onClick) => {
|
|
390
390
|
let {
|
|
391
391
|
playerOptions,
|
|
@@ -399,15 +399,15 @@ const getInteractionAreaItem = (_ref, item, index, durationTime, onClick) => {
|
|
|
399
399
|
return (0,_utils_dom__WEBPACK_IMPORTED_MODULE_2__.elementsCreator)({
|
|
400
400
|
tag: 'div',
|
|
401
401
|
attr: {
|
|
402
|
-
class:
|
|
402
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-item theme-${theme}`,
|
|
403
403
|
'data-id': getInteractionAreaItemId(item, index)
|
|
404
404
|
},
|
|
405
405
|
style: {
|
|
406
|
-
left:
|
|
407
|
-
top:
|
|
408
|
-
width:
|
|
409
|
-
height:
|
|
410
|
-
transitionDuration:
|
|
406
|
+
left: `${item.left}%`,
|
|
407
|
+
top: `${item.top}%`,
|
|
408
|
+
width: `${item.width}%`,
|
|
409
|
+
height: `${item.height}%`,
|
|
410
|
+
transitionDuration: `${durationTime}ms`
|
|
411
411
|
},
|
|
412
412
|
event: {
|
|
413
413
|
name: 'click',
|
|
@@ -416,12 +416,12 @@ const getInteractionAreaItem = (_ref, item, index, durationTime, onClick) => {
|
|
|
416
416
|
children: [{
|
|
417
417
|
tag: 'div',
|
|
418
418
|
attr: {
|
|
419
|
-
class:
|
|
419
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-area-marker`
|
|
420
420
|
},
|
|
421
421
|
children: [{
|
|
422
422
|
tag: 'div',
|
|
423
423
|
attr: {
|
|
424
|
-
class:
|
|
424
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-marker-shadow`
|
|
425
425
|
},
|
|
426
426
|
style: {
|
|
427
427
|
[theme === _interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_THEME.SHADOWED ? 'backgroundColor' : 'borderColor']: accentColor
|
|
@@ -429,7 +429,7 @@ const getInteractionAreaItem = (_ref, item, index, durationTime, onClick) => {
|
|
|
429
429
|
}, {
|
|
430
430
|
tag: 'div',
|
|
431
431
|
attr: {
|
|
432
|
-
class:
|
|
432
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-marker-main`
|
|
433
433
|
},
|
|
434
434
|
style: {
|
|
435
435
|
borderColor: accentColor
|
|
@@ -471,7 +471,7 @@ const setInteractionAreasContainer = (videojs, newInteractionAreasContainer) =>
|
|
|
471
471
|
videojs.el().appendChild(newInteractionAreasContainer);
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
|
-
const getInteractionAreaElementById = (interactionAreasContainer, item, index) => interactionAreasContainer.querySelector(
|
|
474
|
+
const getInteractionAreaElementById = (interactionAreasContainer, item, index) => interactionAreasContainer.querySelector(`[data-id=${getInteractionAreaItemId(item, index)}]`);
|
|
475
475
|
const updateInteractionAreasItem = (videojs, configs, interactionAreasData, previousInteractionAreasData, durationTime, onClick) => {
|
|
476
476
|
const interactionAreasContainer = getInteractionAreasContainer(videojs);
|
|
477
477
|
interactionAreasData.forEach((item, index) => {
|
|
@@ -482,11 +482,11 @@ const updateInteractionAreasItem = (videojs, configs, interactionAreasData, prev
|
|
|
482
482
|
// in case the element of the item is in the dom and exist in the previous data , it update the element position
|
|
483
483
|
if (isExistItem && itemElement) {
|
|
484
484
|
(0,_utils_dom__WEBPACK_IMPORTED_MODULE_2__.styleElement)(itemElement, {
|
|
485
|
-
left:
|
|
486
|
-
top:
|
|
487
|
-
width:
|
|
488
|
-
height:
|
|
489
|
-
transitionDuration:
|
|
485
|
+
left: `${item.left}%`,
|
|
486
|
+
top: `${item.top}%`,
|
|
487
|
+
width: `${item.width}%`,
|
|
488
|
+
height: `${item.height}%`,
|
|
489
|
+
transitionDuration: `${durationTime}ms`
|
|
490
490
|
});
|
|
491
491
|
// if the element did not exist before , not in the dom and not in the previous data , it add a new element
|
|
492
492
|
} else if (!isExistItem && !itemElement) {
|
|
@@ -524,23 +524,23 @@ const onClickInteractionAreaLayoutClick = function (checked) {
|
|
|
524
524
|
const createInteractionAreaLayoutMessage = function (videojs, onClick) {
|
|
525
525
|
let showItAgainCheckbox = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
526
526
|
let checked = false;
|
|
527
|
-
const id =
|
|
527
|
+
const id = `checkbox_${Math.round(Math.random() * 10000)}`;
|
|
528
528
|
const tracksContainer = (0,_utils_dom__WEBPACK_IMPORTED_MODULE_2__.elementsCreator)({
|
|
529
529
|
tag: 'div',
|
|
530
530
|
attr: {
|
|
531
|
-
class:
|
|
531
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_CONTAINER_CLASS_NAME} ${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message ${showItAgainCheckbox ? '' : 'clickable'}`
|
|
532
532
|
},
|
|
533
533
|
onClick: !showItAgainCheckbox ? () => onClickInteractionAreaLayoutClick(checked, onClick) : null,
|
|
534
534
|
children: [{
|
|
535
535
|
tag: 'img',
|
|
536
536
|
attr: {
|
|
537
|
-
class:
|
|
537
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-icon`,
|
|
538
538
|
src: _interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREA_HAND_ICON
|
|
539
539
|
}
|
|
540
540
|
}, {
|
|
541
541
|
tag: 'h3',
|
|
542
542
|
attr: {
|
|
543
|
-
class:
|
|
543
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message-title`
|
|
544
544
|
},
|
|
545
545
|
children: 'Tap on dots to zoom for a product.'
|
|
546
546
|
}, (0,_components_themeButton_themedButton__WEBPACK_IMPORTED_MODULE_5__.themedButton)({
|
|
@@ -551,13 +551,13 @@ const createInteractionAreaLayoutMessage = function (videojs, onClick) {
|
|
|
551
551
|
}), showItAgainCheckbox && {
|
|
552
552
|
tag: 'div',
|
|
553
553
|
attr: {
|
|
554
|
-
class:
|
|
554
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message-do-not-show`
|
|
555
555
|
},
|
|
556
556
|
children: [{
|
|
557
557
|
tag: 'input',
|
|
558
558
|
attr: {
|
|
559
559
|
type: 'checkbox',
|
|
560
|
-
class:
|
|
560
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message-checkbox`,
|
|
561
561
|
id
|
|
562
562
|
},
|
|
563
563
|
event: {
|
|
@@ -569,7 +569,7 @@ const createInteractionAreaLayoutMessage = function (videojs, onClick) {
|
|
|
569
569
|
}, {
|
|
570
570
|
tag: 'label',
|
|
571
571
|
attr: {
|
|
572
|
-
class:
|
|
572
|
+
class: `${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_PREFIX}-layout-message-checkbox-title`,
|
|
573
573
|
for: id
|
|
574
574
|
},
|
|
575
575
|
children: 'Don׳t show it again'
|
|
@@ -578,7 +578,7 @@ const createInteractionAreaLayoutMessage = function (videojs, onClick) {
|
|
|
578
578
|
});
|
|
579
579
|
setInteractionAreasContainer(videojs, tracksContainer);
|
|
580
580
|
};
|
|
581
|
-
const getInteractionAreasContainer = videojs => videojs.el().querySelector(
|
|
581
|
+
const getInteractionAreasContainer = videojs => videojs.el().querySelector(`.${_interaction_areas_const__WEBPACK_IMPORTED_MODULE_3__.INTERACTION_AREAS_CONTAINER_CLASS_NAME}`);
|
|
582
582
|
const removeInteractionAreasContainer = videojs => {
|
|
583
583
|
const interactionAreasContainer = getInteractionAreasContainer(videojs);
|
|
584
584
|
|
|
@@ -596,8 +596,8 @@ const setInteractionAreasContainerSize = (videojs, videoElement) => {
|
|
|
596
596
|
} = videoElement;
|
|
597
597
|
const videoAspectRatio = videoWidth / videoHeight;
|
|
598
598
|
const width = videoAspectRatio * videoElement.clientHeight;
|
|
599
|
-
interactionAreasContainer.style.width =
|
|
600
|
-
interactionAreasContainer.style.height = videoElement.clientWidth < width ?
|
|
599
|
+
interactionAreasContainer.style.width = `${videoElement.clientWidth < width ? '100%' : width}px`;
|
|
600
|
+
interactionAreasContainer.style.height = videoElement.clientWidth < width ? `${videoElement.clientWidth / videoAspectRatio}px` : '100%';
|
|
601
601
|
};
|
|
602
602
|
|
|
603
603
|
/***/ }),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[404],{9017:(t,e,n)=>{"use strict";n.d(e,{F0:()=>r,Fg:()=>a,IT:()=>
|
|
1
|
+
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[404],{9017:(t,e,n)=>{"use strict";n.d(e,{F0:()=>r,Fg:()=>a,IT:()=>s,T$:()=>l,Vv:()=>d,Yx:()=>c,be:()=>o,q3:()=>u,sb:()=>i});const i="cld-ia-layout-state",o="vp-ia",a="interaction-areas-container",r={PORTRAIT:"portrait",LANDSCAPE:"landscape",All:"all",CENTER:"center"},s={PULSING:"pulsing",SHADOWED:"shadowed"},c={[r.PORTRAIT]:"https://res.cloudinary.com/prod/raw/upload/v1623772481/video-player/vtts/portrait.vtt",[r.LANDSCAPE]:"https://res.cloudinary.com/prod/raw/upload/v1623772303/video-player/vtts/landscape.vtt",[r.All]:"https://res.cloudinary.com/prod/raw/upload/v1623250266/video-player/vtts/all.vtt",[r.CENTER]:"https://res.cloudinary.com/prod/raw/upload/v1623250265/video-player/vtts/center.vtt"},l="https://res.cloudinary.com/prod/image/upload/v1626764643/video-player/interaction-area-hand.svg",d=4500,u=250},1066:(t,e,n)=>{"use strict";n.d(e,{interactionAreasService:()=>C});var i=n(6673),o=n.n(i),a=n(2832),r=n.n(a),s=n(2858),c=n.n(s),l=n(5114),d=n.n(l),u=n(9017),v=n(7134),p=n(4500);const h=t=>{let{text:e,onClick:n,theme:i="",loadingDelay:o=0}=t;return(0,v.It)({tag:"button",attr:{class:`vp-theme-button theme-${i}`},onClick:n,children:[{tag:"div",attr:{class:"vp-loading-bar"},style:{"animation-duration":`${o}ms`}},{tag:"div",attr:{class:"content"},children:e}]})},f="transparent-white",m=(t,e)=>t.id||t.type||`id_${e}`,g=(t,e,n,i,o)=>{let{playerOptions:a,videojsOptions:s}=t;const c=(0,p.w)(s),l=a&&a.colors?a.colors.accent:c.accent,d=r()(s,"interactionDisplay.theme.template",u.IT.PULSING);return(0,v.It)({tag:"div",attr:{class:`${u.be}-item theme-${d}`,"data-id":m(e,n)},style:{left:`${e.left}%`,top:`${e.top}%`,width:`${e.width}%`,height:`${e.height}%`,transitionDuration:`${i}ms`},event:{name:"click",callback:o},children:[{tag:"div",attr:{class:`${u.be}-area-marker`},children:[{tag:"div",attr:{class:`${u.be}-marker-shadow`},style:{[d===u.IT.SHADOWED?"backgroundColor":"borderColor"]:l}},{tag:"div",attr:{class:`${u.be}-marker-main`},style:{borderColor:l}}]}]})},y=(t,e)=>t/(100/+e),b=(t,e)=>{const n=x(t);n?n.replaceWith(e):t.el().appendChild(e)},T=(t,e,n)=>t.querySelector(`[data-id=${m(e,n)}]`),$=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d();localStorage.setItem(u.sb,JSON.parse(t)),e()},x=t=>t.el().querySelector(`.${u.Fg}`),E=t=>{const e=x(t);e&&e.parentNode.removeChild(e)};var w=n(8838),k=n(1104);const C=(t,e,n)=>{let i=!1,a=null,s=null,l=d();const p=()=>{return t=n.interactionDisplay,r()(t,"layout.enable",!0)&&"true"!==localStorage.getItem(u.sb);var t},C=()=>{const t=D();return!(!t||void 0===t.syncOffsetTime)&&t.syncOffsetTime};function j(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=D();return t||e&&e.enable}function A(){s&&t.videojs.removeRemoteTextTrack(s);const e=j(),n=D();if(!e||i)return null;if(Array.isArray(n.template))L(n.template),M();else{const e=n.vttUrl||u.Yx[n.template];e&&(s=(0,w.eo)(t.videojs,e),function(e){if(!e)return;let n=null;e.addEventListener("cuechange",(()=>{const i=e.activeCues&&e.activeCues[0];if(i){const t=Math.max(Math.floor(1e3*(i.endTime-i.startTime)),u.q3),e=JSON.parse(i.text);L(e,n,t),!n&&M(),n=e}else E(t.videojs),n=null}))}(s))}}function D(){const{cldSrc:t}=a;return t&&t.getInteractionAreas()}function I(){E(t.videojs),A(),t.play()}function S(){if(j())if(p()){let e=null;const i=r()(n,"interactionDisplay.layout.showAgain",!1);t.pause(),function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!1;const o=`checkbox_${Math.round(1e4*Math.random())}`,a=(0,v.It)({tag:"div",attr:{class:`${u.Fg} ${u.be}-layout-message ${n?"":"clickable"}`},onClick:n?null:()=>$(i,e),children:[{tag:"img",attr:{class:`${u.be}-layout-icon`,src:u.T$}},{tag:"h3",attr:{class:`${u.be}-layout-message-title`},children:"Tap on dots to zoom for a product."},h({text:"Got it",theme:f,loadingDelay:n?0:u.Vv,onClick:n?()=>$(i,e):null}),n&&{tag:"div",attr:{class:`${u.be}-layout-message-do-not-show`},children:[{tag:"input",attr:{type:"checkbox",class:`${u.be}-layout-message-checkbox`,id:o},event:{name:"input",callback:t=>{i=t.target.checked}}},{tag:"label",attr:{class:`${u.be}-layout-message-checkbox-title`,for:o},children:"Don׳t show it again"}]}].filter((t=>t))});b(t,a)}(t.videojs,(()=>{clearTimeout(e),I()}),i),i||(e=setTimeout(I,u.Vv))}else I()}function O(e,n,r){const s=t.currentTime(),c=C(),{cldSrc:d}=a,p=d.getInitOptions(),h=n||{transformation:p.transformation},f=!e&&((t,e)=>{const{videoHeight:n,videoWidth:i}=t,o=y(i,e.left),a=y(n,e.top),r=y(i,e.width),s=y(n,e.height),c=i/n,l=r/s,d=Math.round(l>1||c>1?s*l:r),u=Math.round(d/c),v=Math.round(o-(d-r)/2),p=Math.round(a-(u-s)/2);return{width:d,height:u,x:Math.min(Math.max(v,0),i-d),y:Math.min(Math.max(p,0),n-u),crop:"crop"}})(t.videoElement,r),m=f?o().obj.merge({transformation:f},h):h,g=d.isRawUrl?a.src:{publicId:d.publicId()};t.source(f?{publicId:d.publicId()}:e,m).play(),c&&t.currentTime(s),i=!0,function(){const e=(0,v.n)("div",{class:"go-back-button"});e.addEventListener("click",(()=>{l()}),!1);const n=(0,v.n)("div",{class:u.Fg},e);b(t.videojs,n)}(),l=()=>{if(i){i=!1;const e=t.currentTime(),n=t.duration();t.source(g,p).play(),c&&e<n&&t.currentTime(e),A()}}}function N(t){let{event:e,item:n,index:i}=t;const o=D();o.onClick&&o.onClick({item:n,index:i,event:e,zoom:(t,e)=>{O(t,e,n)}})}function L(i,o){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r={playerOptions:e,videojsOptions:n};if(o)((t,e,n,i,o,a)=>{const r=x(t);n.forEach(((t,n)=>{const s=T(r,t,n),c=m(t),l=i.some((t=>m(t)===c));l&&s?(0,v.cu)(s,{left:`${t.left}%`,top:`${t.top}%`,width:`${t.width}%`,height:`${t.height}%`,transitionDuration:`${o}ms`}):l||s||r.appendChild(g(e,t,n,o,(e=>{a({event:e,item:t,index:n})})))})),i.forEach(((t,e)=>{const i=T(r,t,e),o=m(t),a=!n.some((t=>m(t)===o));i&&a&&i.parentNode.removeChild(i)}))})(t.videojs,r,i,o,a,N);else{const e=i.map(((t,e)=>g(r,t,e,a,(n=>{N({event:n,item:t,index:e})}))));b(t.videojs,(0,v.n)("div",{class:u.Fg},e))}}function M(){j()&&((t,e)=>{const n=x(t);if(!n)return;const{videoHeight:i,videoWidth:o}=e,a=o/i,r=a*e.clientHeight;n.style.width=`${e.clientWidth<r?"100%":r}px`,n.style.height=e.clientWidth<r?e.clientWidth/a+"px":"100%"})(t.videojs,t.videoElement)}!function(){if(a=a||t.videojs.currentSource(),j()){t.videojs.el().classList.add("interaction-areas"),t.videojs.one(k.f.PLAY,(()=>{"object"==typeof t.videojs.ima?t.on("adsready",(()=>{t.videojs.ima.addEventListener(window.google.ima.AdEvent.Type.ALL_ADS_COMPLETED,S)})):S()}));const e=c()(M,100);t.videojs.on(k.f.FULL_SCREEN_CHANGE,(()=>{setTimeout(e,100)}));const n=(0,v.q2)(window,"resize",M,!1);t.videojs.on(k.f.DISPOSE,n)}t.videojs.on(k.f.ENDED,(()=>{l()})),t.videojs.on(k.f.ERROR,(()=>{t.pause()}))}()}},8812:(t,e,n)=>{var i=n(2140),o=/^\s+/;t.exports=function(t){return t?t.slice(0,i(t)+1).replace(o,""):t}},2140:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},6177:(t,e,n)=>{var i=n(8953),o=n(3664),a=n(5378),r=Math.max,s=Math.min;t.exports=function(t,e,n){var c,l,d,u,v,p,h=0,f=!1,m=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var n=c,i=l;return c=l=void 0,h=e,u=t.apply(i,n)}function b(t){var n=t-p;return void 0===p||n>=e||n<0||m&&t-h>=d}function T(){var t=o();if(b(t))return $(t);v=setTimeout(T,function(t){var n=e-(t-p);return m?s(n,d-(t-h)):n}(t))}function $(t){return v=void 0,g&&c?y(t):(c=l=void 0,u)}function x(){var t=o(),n=b(t);if(c=arguments,l=this,p=t,n){if(void 0===v)return function(t){return h=t,v=setTimeout(T,e),f?y(t):u}(p);if(m)return clearTimeout(v),v=setTimeout(T,e),y(p)}return void 0===v&&(v=setTimeout(T,e)),u}return e=a(e)||0,i(n)&&(f=!!n.leading,d=(m="maxWait"in n)?r(a(n.maxWait)||0,e):d,g="trailing"in n?!!n.trailing:g),x.cancel=function(){void 0!==v&&clearTimeout(v),h=0,c=p=l=v=void 0},x.flush=function(){return void 0===v?u:$(o())},x}},5114:t=>{t.exports=function(){}},3664:(t,e,n)=>{var i=n(1433);t.exports=function(){return i.Date.now()}},2858:(t,e,n)=>{var i=n(6177),o=n(8953);t.exports=function(t,e,n){var a=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(n)&&(a="leading"in n?!!n.leading:a,r="trailing"in n?!!n.trailing:r),i(t,e,{leading:a,maxWait:e,trailing:r})}},5378:(t,e,n)=>{var i=n(8812),o=n(8953),a=n(5414),r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=i(t);var n=s.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):r.test(t)?NaN:+t}}}]);
|
|
2
2
|
//# sourceMappingURL=interaction-areas.light.min.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[404],{9017:(t,e,n)=>{"use strict";n.d(e,{F0:()=>r,Fg:()=>a,IT:()=>
|
|
1
|
+
(self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[404],{9017:(t,e,n)=>{"use strict";n.d(e,{F0:()=>r,Fg:()=>a,IT:()=>s,T$:()=>l,Vv:()=>d,Yx:()=>c,be:()=>o,q3:()=>u,sb:()=>i});const i="cld-ia-layout-state",o="vp-ia",a="interaction-areas-container",r={PORTRAIT:"portrait",LANDSCAPE:"landscape",All:"all",CENTER:"center"},s={PULSING:"pulsing",SHADOWED:"shadowed"},c={[r.PORTRAIT]:"https://res.cloudinary.com/prod/raw/upload/v1623772481/video-player/vtts/portrait.vtt",[r.LANDSCAPE]:"https://res.cloudinary.com/prod/raw/upload/v1623772303/video-player/vtts/landscape.vtt",[r.All]:"https://res.cloudinary.com/prod/raw/upload/v1623250266/video-player/vtts/all.vtt",[r.CENTER]:"https://res.cloudinary.com/prod/raw/upload/v1623250265/video-player/vtts/center.vtt"},l="https://res.cloudinary.com/prod/image/upload/v1626764643/video-player/interaction-area-hand.svg",d=4500,u=250},1066:(t,e,n)=>{"use strict";n.d(e,{interactionAreasService:()=>C});var i=n(7938),o=n.n(i),a=n(2832),r=n.n(a),s=n(2858),c=n.n(s),l=n(5114),d=n.n(l),u=n(9017),v=n(7134),p=n(4500);const h=t=>{let{text:e,onClick:n,theme:i="",loadingDelay:o=0}=t;return(0,v.It)({tag:"button",attr:{class:`vp-theme-button theme-${i}`},onClick:n,children:[{tag:"div",attr:{class:"vp-loading-bar"},style:{"animation-duration":`${o}ms`}},{tag:"div",attr:{class:"content"},children:e}]})},f="transparent-white",m=(t,e)=>t.id||t.type||`id_${e}`,g=(t,e,n,i,o)=>{let{playerOptions:a,videojsOptions:s}=t;const c=(0,p.w)(s),l=a&&a.colors?a.colors.accent:c.accent,d=r()(s,"interactionDisplay.theme.template",u.IT.PULSING);return(0,v.It)({tag:"div",attr:{class:`${u.be}-item theme-${d}`,"data-id":m(e,n)},style:{left:`${e.left}%`,top:`${e.top}%`,width:`${e.width}%`,height:`${e.height}%`,transitionDuration:`${i}ms`},event:{name:"click",callback:o},children:[{tag:"div",attr:{class:`${u.be}-area-marker`},children:[{tag:"div",attr:{class:`${u.be}-marker-shadow`},style:{[d===u.IT.SHADOWED?"backgroundColor":"borderColor"]:l}},{tag:"div",attr:{class:`${u.be}-marker-main`},style:{borderColor:l}}]}]})},y=(t,e)=>t/(100/+e),b=(t,e)=>{const n=x(t);n?n.replaceWith(e):t.el().appendChild(e)},T=(t,e,n)=>t.querySelector(`[data-id=${m(e,n)}]`),$=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d();localStorage.setItem(u.sb,JSON.parse(t)),e()},x=t=>t.el().querySelector(`.${u.Fg}`),E=t=>{const e=x(t);e&&e.parentNode.removeChild(e)};var w=n(8838),k=n(1104);const C=(t,e,n)=>{let i=!1,a=null,s=null,l=d();const p=()=>{return t=n.interactionDisplay,r()(t,"layout.enable",!0)&&"true"!==localStorage.getItem(u.sb);var t},C=()=>{const t=D();return!(!t||void 0===t.syncOffsetTime)&&t.syncOffsetTime};function j(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=D();return t||e&&e.enable}function A(){s&&t.videojs.removeRemoteTextTrack(s);const e=j(),n=D();if(!e||i)return null;if(Array.isArray(n.template))L(n.template),M();else{const e=n.vttUrl||u.Yx[n.template];e&&(s=(0,w.eo)(t.videojs,e),function(e){if(!e)return;let n=null;e.addEventListener("cuechange",(()=>{const i=e.activeCues&&e.activeCues[0];if(i){const t=Math.max(Math.floor(1e3*(i.endTime-i.startTime)),u.q3),e=JSON.parse(i.text);L(e,n,t),!n&&M(),n=e}else E(t.videojs),n=null}))}(s))}}function D(){const{cldSrc:t}=a;return t&&t.getInteractionAreas()}function I(){E(t.videojs),A(),t.play()}function S(){if(j())if(p()){let e=null;const i=r()(n,"interactionDisplay.layout.showAgain",!1);t.pause(),function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!1;const o=`checkbox_${Math.round(1e4*Math.random())}`,a=(0,v.It)({tag:"div",attr:{class:`${u.Fg} ${u.be}-layout-message ${n?"":"clickable"}`},onClick:n?null:()=>$(i,e),children:[{tag:"img",attr:{class:`${u.be}-layout-icon`,src:u.T$}},{tag:"h3",attr:{class:`${u.be}-layout-message-title`},children:"Tap on dots to zoom for a product."},h({text:"Got it",theme:f,loadingDelay:n?0:u.Vv,onClick:n?()=>$(i,e):null}),n&&{tag:"div",attr:{class:`${u.be}-layout-message-do-not-show`},children:[{tag:"input",attr:{type:"checkbox",class:`${u.be}-layout-message-checkbox`,id:o},event:{name:"input",callback:t=>{i=t.target.checked}}},{tag:"label",attr:{class:`${u.be}-layout-message-checkbox-title`,for:o},children:"Don׳t show it again"}]}].filter((t=>t))});b(t,a)}(t.videojs,(()=>{clearTimeout(e),I()}),i),i||(e=setTimeout(I,u.Vv))}else I()}function O(e,n,r){const s=t.currentTime(),c=C(),{cldSrc:d}=a,p=d.getInitOptions(),h=n||{transformation:p.transformation},f=!e&&((t,e)=>{const{videoHeight:n,videoWidth:i}=t,o=y(i,e.left),a=y(n,e.top),r=y(i,e.width),s=y(n,e.height),c=i/n,l=r/s,d=Math.round(l>1||c>1?s*l:r),u=Math.round(d/c),v=Math.round(o-(d-r)/2),p=Math.round(a-(u-s)/2);return{width:d,height:u,x:Math.min(Math.max(v,0),i-d),y:Math.min(Math.max(p,0),n-u),crop:"crop"}})(t.videoElement,r),m=f?o().obj.merge({transformation:f},h):h,g=d.isRawUrl?a.src:{publicId:d.publicId()};t.source(f?{publicId:d.publicId()}:e,m).play(),c&&t.currentTime(s),i=!0,function(){const e=(0,v.n)("div",{class:"go-back-button"});e.addEventListener("click",(()=>{l()}),!1);const n=(0,v.n)("div",{class:u.Fg},e);b(t.videojs,n)}(),l=()=>{if(i){i=!1;const e=t.currentTime(),n=t.duration();t.source(g,p).play(),c&&e<n&&t.currentTime(e),A()}}}function N(t){let{event:e,item:n,index:i}=t;const o=D();o.onClick&&o.onClick({item:n,index:i,event:e,zoom:(t,e)=>{O(t,e,n)}})}function L(i,o){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r={playerOptions:e,videojsOptions:n};if(o)((t,e,n,i,o,a)=>{const r=x(t);n.forEach(((t,n)=>{const s=T(r,t,n),c=m(t),l=i.some((t=>m(t)===c));l&&s?(0,v.cu)(s,{left:`${t.left}%`,top:`${t.top}%`,width:`${t.width}%`,height:`${t.height}%`,transitionDuration:`${o}ms`}):l||s||r.appendChild(g(e,t,n,o,(e=>{a({event:e,item:t,index:n})})))})),i.forEach(((t,e)=>{const i=T(r,t,e),o=m(t),a=!n.some((t=>m(t)===o));i&&a&&i.parentNode.removeChild(i)}))})(t.videojs,r,i,o,a,N);else{const e=i.map(((t,e)=>g(r,t,e,a,(n=>{N({event:n,item:t,index:e})}))));b(t.videojs,(0,v.n)("div",{class:u.Fg},e))}}function M(){j()&&((t,e)=>{const n=x(t);if(!n)return;const{videoHeight:i,videoWidth:o}=e,a=o/i,r=a*e.clientHeight;n.style.width=`${e.clientWidth<r?"100%":r}px`,n.style.height=e.clientWidth<r?e.clientWidth/a+"px":"100%"})(t.videojs,t.videoElement)}!function(){if(a=a||t.videojs.currentSource(),j()){t.videojs.el().classList.add("interaction-areas"),t.videojs.one(k.f.PLAY,(()=>{"object"==typeof t.videojs.ima?t.on("adsready",(()=>{t.videojs.ima.addEventListener(window.google.ima.AdEvent.Type.ALL_ADS_COMPLETED,S)})):S()}));const e=c()(M,100);t.videojs.on(k.f.FULL_SCREEN_CHANGE,(()=>{setTimeout(e,100)}));const n=(0,v.q2)(window,"resize",M,!1);t.videojs.on(k.f.DISPOSE,n)}t.videojs.on(k.f.ENDED,(()=>{l()})),t.videojs.on(k.f.ERROR,(()=>{t.pause()}))}()}},8812:(t,e,n)=>{var i=n(2140),o=/^\s+/;t.exports=function(t){return t?t.slice(0,i(t)+1).replace(o,""):t}},2140:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},6177:(t,e,n)=>{var i=n(8953),o=n(3664),a=n(5378),r=Math.max,s=Math.min;t.exports=function(t,e,n){var c,l,d,u,v,p,h=0,f=!1,m=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var n=c,i=l;return c=l=void 0,h=e,u=t.apply(i,n)}function b(t){var n=t-p;return void 0===p||n>=e||n<0||m&&t-h>=d}function T(){var t=o();if(b(t))return $(t);v=setTimeout(T,function(t){var n=e-(t-p);return m?s(n,d-(t-h)):n}(t))}function $(t){return v=void 0,g&&c?y(t):(c=l=void 0,u)}function x(){var t=o(),n=b(t);if(c=arguments,l=this,p=t,n){if(void 0===v)return function(t){return h=t,v=setTimeout(T,e),f?y(t):u}(p);if(m)return clearTimeout(v),v=setTimeout(T,e),y(p)}return void 0===v&&(v=setTimeout(T,e)),u}return e=a(e)||0,i(n)&&(f=!!n.leading,d=(m="maxWait"in n)?r(a(n.maxWait)||0,e):d,g="trailing"in n?!!n.trailing:g),x.cancel=function(){void 0!==v&&clearTimeout(v),h=0,c=p=l=v=void 0},x.flush=function(){return void 0===v?u:$(o())},x}},5114:t=>{t.exports=function(){}},3664:(t,e,n)=>{var i=n(1433);t.exports=function(){return i.Date.now()}},2858:(t,e,n)=>{var i=n(6177),o=n(8953);t.exports=function(t,e,n){var a=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return o(n)&&(a="leading"in n?!!n.leading:a,r="trailing"in n?!!n.trailing:r),i(t,e,{leading:a,maxWait:e,trailing:r})}},5378:(t,e,n)=>{var i=n(8812),o=n(8953),a=n(5414),r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=i(t);var n=s.test(t);return n||c.test(t)?l(t.slice(2),n?2:8):r.test(t)?NaN:+t}}}]);
|
|
2
2
|
//# sourceMappingURL=interaction-areas.min.js.map
|