cloudinary-video-player 3.12.1 → 3.12.2-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/dist/134.min.js +8 -0
- package/dist/309.min.js +6 -0
- package/dist/adaptive-streaming.js +9 -9
- package/dist/adaptive-streaming.min.js +2 -2
- package/dist/chapters.js +4 -4
- package/dist/chapters.min.js +3 -3
- package/dist/cld-player-core.js +37 -0
- package/dist/cld-player-core.min.js +6 -0
- package/dist/cld-video-player-lazy.js +494 -0
- package/dist/cld-video-player-lazy.min.js +6 -0
- package/dist/cld-video-player.css +2 -2
- package/dist/cld-video-player.js +366 -332
- package/dist/cld-video-player.light.js +366 -332
- package/dist/cld-video-player.light.min.js +4 -4
- package/dist/cld-video-player.min.css +2 -2
- package/dist/cld-video-player.min.js +4 -4
- package/dist/colors.js +4 -4
- package/dist/colors.min.js +2 -2
- package/dist/dash.js +6 -6
- package/dist/dash.min.js +2 -2
- package/dist/debug.js +8 -8
- package/dist/debug.min.js +3 -3
- package/dist/ima.js +9 -9
- package/dist/ima.min.js +2 -2
- package/dist/interaction-areas.js +11 -11
- package/dist/interaction-areas.min.js +2 -2
- package/dist/node_modules_lodash_throttle_js.js +8 -8
- package/dist/playlist.js +31 -31
- package/dist/playlist.min.js +3 -3
- package/dist/recommendations-overlay.js +10 -10
- package/dist/recommendations-overlay.min.js +2 -2
- package/dist/schema.json +19 -0
- package/dist/share.js +5 -5
- package/dist/share.min.js +3 -3
- package/dist/shoppable.js +12 -12
- package/dist/shoppable.min.js +2 -2
- package/dist/utils_fetch-config_js.js +81 -0
- package/dist/video-player_js.js +3111 -0
- package/dist/visual-search.js +7 -7
- package/dist/visual-search.min.js +2 -2
- package/lib/_commonjsHelpers.js +7 -0
- package/lib/_videojs-proxy.js +30294 -0
- package/lib/abr-strategies.js +31 -0
- package/lib/adaptive-streaming.js +468 -2
- package/lib/all.js +25 -2
- package/lib/chapters.js +205 -1
- package/lib/cld-video-player.min.css +5 -22
- package/lib/colors.js +59 -1
- package/lib/{schema.json → config/configSchema.json} +19 -0
- package/lib/dash.js +69943 -2
- package/lib/debug.js +322 -1
- package/lib/document.js +770 -0
- package/lib/download-button.js +48 -0
- package/lib/fetch-config.js +93 -0
- package/lib/ima.js +6851 -1
- package/lib/index.js +27 -0
- package/lib/interaction-areas.const.js +24 -0
- package/lib/interaction-areas.service.js +469 -0
- package/lib/lazy.js +20 -0
- package/lib/noop.js +33 -0
- package/lib/player-api.js +469 -0
- package/lib/player.js +7 -2
- package/lib/playlist-panel.js +602 -0
- package/lib/playlist.js +637 -1
- package/lib/querystring.js +81 -0
- package/lib/recommendations-overlay.js +320 -1
- package/lib/share.js +129 -1
- package/lib/shoppable-post-widget.js +572 -0
- package/lib/shoppable-widget.js +77 -0
- package/lib/throttle.js +318 -0
- package/lib/toNumber.js +134 -0
- package/lib/validators-functions.js +485 -0
- package/lib/video-player.js +16241 -0
- package/lib/videoPlayer.js +7 -2
- package/lib/videojs-contrib-hlsjs.js +37638 -0
- package/lib/visual-search.js +235 -1
- package/package.json +31 -15
- package/lib/adaptive-streaming.js.LICENSE.txt +0 -3
- package/lib/all.js.LICENSE.txt +0 -25
- package/lib/cld-video-player.js +0 -2
- package/lib/cld-video-player.js.LICENSE.txt +0 -21
- package/lib/dash.js.LICENSE.txt +0 -1842
- package/lib/interaction-areas.js +0 -1
- package/lib/player.js.LICENSE.txt +0 -21
- package/lib/shoppable.js +0 -1
- package/lib/videoPlayer.js.LICENSE.txt +0 -21
package/lib/colors.js
CHANGED
|
@@ -1 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
import { i as isLight } from './video-player.js';
|
|
2
|
+
import './_videojs-proxy.js';
|
|
3
|
+
import './_commonjsHelpers.js';
|
|
4
|
+
import './validators-functions.js';
|
|
5
|
+
import './querystring.js';
|
|
6
|
+
import './player-api.js';
|
|
7
|
+
|
|
8
|
+
const defaults = {
|
|
9
|
+
colorsDark: {
|
|
10
|
+
'base': '#000000',
|
|
11
|
+
'accent': '#0D9AFF',
|
|
12
|
+
'text': '#FFFFFF'
|
|
13
|
+
},
|
|
14
|
+
colorsLight: {
|
|
15
|
+
'base': '#FFFFFF',
|
|
16
|
+
'accent': '#0D9AFF',
|
|
17
|
+
'text': '#000000'
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const getDefaultPlayerColor = options => {
|
|
21
|
+
return isLight(options) ? defaults.colorsLight : defaults.colorsDark;
|
|
22
|
+
};
|
|
23
|
+
const colorsPlugin = function (player) {
|
|
24
|
+
let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
25
|
+
const skinDefaults = getDefaultPlayerColor(player.options_);
|
|
26
|
+
opts.colors = Object.assign({}, skinDefaults, opts.colors);
|
|
27
|
+
|
|
28
|
+
// Set CSS custom properties on the player element
|
|
29
|
+
const playerEl = player.el();
|
|
30
|
+
if (opts.colors.base) {
|
|
31
|
+
playerEl.style.setProperty('--color-base', opts.colors.base);
|
|
32
|
+
}
|
|
33
|
+
if (opts.colors.accent) {
|
|
34
|
+
playerEl.style.setProperty('--color-accent', opts.colors.accent);
|
|
35
|
+
}
|
|
36
|
+
if (opts.colors.text) {
|
|
37
|
+
playerEl.style.setProperty('--color-text', opts.colors.text);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Return an object with methods to update colors if needed
|
|
41
|
+
return {
|
|
42
|
+
updateColors: newColors => {
|
|
43
|
+
const updatedColors = Object.assign({}, opts.colors, newColors);
|
|
44
|
+
if (updatedColors.base) {
|
|
45
|
+
playerEl.style.setProperty('--color-base', updatedColors.base);
|
|
46
|
+
}
|
|
47
|
+
if (updatedColors.accent) {
|
|
48
|
+
playerEl.style.setProperty('--color-accent', updatedColors.accent);
|
|
49
|
+
}
|
|
50
|
+
if (updatedColors.text) {
|
|
51
|
+
playerEl.style.setProperty('--color-text', updatedColors.text);
|
|
52
|
+
}
|
|
53
|
+
opts.colors = updatedColors;
|
|
54
|
+
},
|
|
55
|
+
getColors: () => opts.colors
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export { colorsPlugin as default, getDefaultPlayerColor };
|
|
@@ -559,6 +559,25 @@
|
|
|
559
559
|
"type": "boolean",
|
|
560
560
|
"default": true
|
|
561
561
|
},
|
|
562
|
+
"schedule": {
|
|
563
|
+
"type": "object",
|
|
564
|
+
"properties": {
|
|
565
|
+
"weekly": {
|
|
566
|
+
"type": "array",
|
|
567
|
+
"items": {
|
|
568
|
+
"type": "object",
|
|
569
|
+
"properties": {
|
|
570
|
+
"day": { "type": "string" },
|
|
571
|
+
"start": { "type": "string" },
|
|
572
|
+
"duration": { "type": "number" }
|
|
573
|
+
},
|
|
574
|
+
"required": ["day", "start", "duration"]
|
|
575
|
+
},
|
|
576
|
+
"default": []
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
"default": {}
|
|
580
|
+
},
|
|
562
581
|
"videoSources": {
|
|
563
582
|
"type": "array",
|
|
564
583
|
"items": {
|