cloudinary-video-player 3.13.0 → 3.13.1-edge.1

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.
Files changed (63) hide show
  1. package/dist/134.min.js +4 -4
  2. package/dist/19.min.js +6 -0
  3. package/dist/309.min.js +3 -3
  4. package/dist/adaptive-streaming.js +2 -2
  5. package/dist/adaptive-streaming.min.js +2 -2
  6. package/dist/chapters.js +2 -2
  7. package/dist/chapters.min.js +2 -2
  8. package/dist/cld-player-core.js +2 -2
  9. package/dist/cld-player-core.min.js +2 -2
  10. package/dist/cld-video-player-lazy.js +5 -5
  11. package/dist/cld-video-player-lazy.min.js +3 -3
  12. package/dist/cld-video-player.css +2 -2
  13. package/dist/cld-video-player.js +10 -10
  14. package/dist/cld-video-player.light.js +10 -10
  15. package/dist/cld-video-player.light.min.js +4 -4
  16. package/dist/cld-video-player.min.css +2 -2
  17. package/dist/cld-video-player.min.js +4 -4
  18. package/dist/colors.js +2 -2
  19. package/dist/colors.min.js +3 -3
  20. package/dist/dash.js +2 -2
  21. package/dist/dash.min.js +2 -2
  22. package/dist/debug.js +2 -2
  23. package/dist/debug.min.js +2 -2
  24. package/dist/ima.js +2 -2
  25. package/dist/ima.min.js +2 -2
  26. package/dist/interaction-areas.js +2 -2
  27. package/dist/interaction-areas.min.js +3 -3
  28. package/dist/node_modules_lodash_throttle_js.js +2 -2
  29. package/dist/playlist.js +2 -2
  30. package/dist/playlist.min.js +2 -2
  31. package/dist/plugins_cloudinary_url-helpers_js-utils_object_js-utils_querystring_js-utils_utf8Base64_js-vi-555007.js +952 -0
  32. package/dist/recommendations-overlay.js +2 -2
  33. package/dist/recommendations-overlay.min.js +2 -2
  34. package/dist/share.js +2 -2
  35. package/dist/share.min.js +2 -2
  36. package/dist/shoppable.js +2 -2
  37. package/dist/shoppable.min.js +2 -2
  38. package/dist/utils_fetch-config_js.js +3 -47
  39. package/dist/video-player_js.js +13 -949
  40. package/dist/visual-search.js +2 -2
  41. package/dist/visual-search.min.js +2 -2
  42. package/lib/all.js +2 -1
  43. package/lib/chapters.js +2 -1
  44. package/lib/cld-video-player.min.css +2 -2
  45. package/lib/colors.js +2 -1
  46. package/lib/debug.js +2 -1
  47. package/lib/fetch-config.js +11 -3
  48. package/lib/index.js +2 -1
  49. package/lib/interaction-areas.service.js +2 -1
  50. package/lib/object.js +2805 -0
  51. package/lib/player.js +2 -1
  52. package/lib/playlist.js +2 -1
  53. package/lib/recommendations-overlay.js +2 -1
  54. package/lib/share.js +2 -1
  55. package/lib/shoppable-widget.js +3 -2
  56. package/lib/throttle.js +1 -1
  57. package/lib/toNumber.js +2 -2
  58. package/lib/validators-functions.js +3 -366
  59. package/lib/video-player.const.js +367 -0
  60. package/lib/video-player.js +80 -2803
  61. package/lib/videoPlayer.js +2 -1
  62. package/package.json +1 -1
  63. package/lib/querystring.js +0 -81
@@ -2,6 +2,7 @@ export { videoPlayer as default } from './index.js';
2
2
  import './_videojs-proxy.js';
3
3
  import './_commonjsHelpers.js';
4
4
  import './video-player.js';
5
+ import './object.js';
6
+ import './video-player.const.js';
5
7
  import './validators-functions.js';
6
- import './querystring.js';
7
8
  import './player-api.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudinary-video-player",
3
- "version": "3.13.0",
3
+ "version": "3.13.1-edge.1",
4
4
  "description": "Cloudinary Video Player",
5
5
  "author": "Cloudinary",
6
6
  "license": "MIT",
@@ -1,81 +0,0 @@
1
- function utf8ToBase64(str) {
2
- const utf8Bytes = new TextEncoder().encode(str);
3
- const binaryStr = String.fromCharCode(...utf8Bytes);
4
- return btoa(binaryStr);
5
- }
6
-
7
- const DEFAULT_POSTER_PARAMS = {
8
- format: 'jpg',
9
- resource_type: 'video'
10
- };
11
- const DEFAULT_VIDEO_PARAMS = {
12
- resource_type: 'video',
13
- type: 'upload',
14
- hdr: false,
15
- transformation: [],
16
- sourceTransformation: {},
17
- sourceTypes: ['auto'],
18
- recommendations: null,
19
- info: {},
20
- interactionAreas: {},
21
- chapters: {}
22
- };
23
- const COMMON_VIDEO_EXTENSIONS = ['3g2', '3gp', 'avi', 'flv', 'm3u8', 'ts', 'm2ts', 'mts', 'mov', 'mkv', 'mp4', 'mpeg', 'mpd', 'mxf', 'ogv', 'webm', 'wmv']; // https://cloudinary.com/documentation/video_manipulation_and_delivery#supported_video_formats
24
-
25
- const VIDEO_SUFFIX_REMOVAL_PATTERN = RegExp(`\\.(${COMMON_VIDEO_EXTENSIONS.join('|')})$$`);
26
-
27
- // eslint-disable-next-line no-control-regex
28
- const URL_PATTERN = RegExp('https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\+.~#?&/=]*)');
29
- const CONTAINER_MIME_TYPES = {
30
- hls: 'application/x-mpegURL',
31
- dash: 'application/dash+xml',
32
- // See: https://docs.videojs.com/utils_mimetypes.js.html
33
- opus: 'video/ogg',
34
- ogv: 'video/ogg',
35
- mp4: 'video/mp4',
36
- mov: 'video/mp4',
37
- m4v: 'video/mp4',
38
- mkv: 'video/x-matroska',
39
- m4a: 'audio/mp4',
40
- mp3: 'audio/mpeg',
41
- aac: 'audio/aac',
42
- caf: 'audio/x-caf',
43
- flac: 'audio/flac',
44
- oga: 'audio/ogg',
45
- wav: 'audio/wav',
46
- m3u8: 'application/x-mpegURL',
47
- mpd: 'application/dash+xml',
48
- jpg: 'image/jpeg',
49
- jpeg: 'image/jpeg',
50
- gif: 'image/gif',
51
- png: 'image/png',
52
- svg: 'image/svg+xml',
53
- webp: 'image/webp'
54
- };
55
- const ADAPTIVE_SOURCETYPES = ['hls', 'dash', 'mpd', 'm3u8'];
56
- const FORMAT_MAPPINGS = {
57
- hls: 'm3u8',
58
- dash: 'mpd'
59
- };
60
-
61
- // Breakpoints constants
62
- const DEFAULT_DPR = 2.0;
63
- const RENDITIONS = [640, 848, 1280, 1920, 2560, 3840];
64
-
65
- const isRawUrl = publicId => URL_PATTERN.test(publicId);
66
-
67
- const appendQueryParams = (url, params) => {
68
- if (!params || !Object.keys(params).length) {
69
- return url;
70
- }
71
- const urlObj = new URL(url);
72
- Object.entries(params).forEach(_ref => {
73
- let [key, value] = _ref;
74
- if (value != null) {
75
- urlObj.searchParams.append(key, value);
76
- }
77
- });
78
- return urlObj.href;
79
- };
80
-
81
- export { ADAPTIVE_SOURCETYPES as A, CONTAINER_MIME_TYPES as C, DEFAULT_VIDEO_PARAMS as D, FORMAT_MAPPINGS as F, RENDITIONS as R, VIDEO_SUFFIX_REMOVAL_PATTERN as V, appendQueryParams as a, DEFAULT_POSTER_PARAMS as b, DEFAULT_DPR as c, isRawUrl as i, utf8ToBase64 as u };