@loaders.gl/video 3.2.4 → 3.2.7

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.
@@ -9,7 +9,7 @@ exports._typecheckVideoLoader = exports.VideoLoader = void 0;
9
9
 
10
10
  var _parseVideo = _interopRequireDefault(require("./lib/parsers/parse-video"));
11
11
 
12
- var VERSION = typeof "3.2.4" !== 'undefined' ? "3.2.4" : 'latest';
12
+ var VERSION = typeof "3.2.7" !== 'undefined' ? "3.2.7" : 'latest';
13
13
  var EXTENSIONS = ['mp4'];
14
14
  var MIME_TYPES = ['video/mp4'];
15
15
  var DEFAULT_LOADER_OPTIONS = {
@@ -1,10 +1,10 @@
1
1
  var utils = {
2
- URL: window.URL || window.webkitURL || window.mozURL || window.msURL,
2
+ URL: globalThis.URL || globalThis.webkitURL || globalThis.mozURL || globalThis.msURL,
3
3
  getUserMedia: function () {
4
4
  const getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
5
5
  return getUserMedia ? getUserMedia.bind(navigator) : getUserMedia;
6
6
  }(),
7
- requestAnimFrame: window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame,
7
+ requestAnimFrame: globalThis.requestAnimationFrame || globalThis.webkitRequestAnimationFrame || globalThis.mozRequestAnimationFrame || globalThis.oRequestAnimationFrame || globalThis.msRequestAnimationFrame,
8
8
  requestTimeout: function requestTimeout(callback, delay) {
9
9
  callback = callback || utils.noop;
10
10
  delay = delay || 0;
@@ -26,9 +26,9 @@ var utils = {
26
26
  handle.value = requestAnimFrame(loop);
27
27
  return handle;
28
28
  },
29
- Blob: window.Blob || window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder,
29
+ Blob: globalThis.Blob || globalThis.BlobBuilder || globalThis.WebKitBlobBuilder || globalThis.MozBlobBuilder || globalThis.MSBlobBuilder,
30
30
  btoa: function () {
31
- const btoa = window.btoa || function (input) {
31
+ const btoa = globalThis.btoa || function (input) {
32
32
  let output = '';
33
33
  let i = 0;
34
34
  const l = input.length;
@@ -62,7 +62,7 @@ var utils = {
62
62
  return output;
63
63
  };
64
64
 
65
- return btoa ? btoa.bind(window) : utils.noop;
65
+ return btoa ? btoa.bind(globalThis) : utils.noop;
66
66
  }(),
67
67
  isObject: function isObject(obj) {
68
68
  return obj && Object.prototype.toString.call(obj) === '[object Object]';
@@ -88,16 +88,16 @@ var utils = {
88
88
  return el && el.getContext && el.getContext('2d');
89
89
  },
90
90
  webworkers: function webworkers() {
91
- return window.Worker;
91
+ return globalThis.Worker;
92
92
  },
93
93
  blob: function blob() {
94
94
  return utils.Blob;
95
95
  },
96
96
  Uint8Array: function Uint8Array() {
97
- return window.Uint8Array;
97
+ return globalThis.Uint8Array;
98
98
  },
99
99
  Uint32Array: function Uint32Array() {
100
- return window.Uint32Array;
100
+ return globalThis.Uint32Array;
101
101
  },
102
102
  videoCodecs: function () {
103
103
  const testEl = document.createElement('video');
@@ -280,20 +280,20 @@ var error = {
280
280
  errorMsg: 'The Web Workers API is not supported in your browser'
281
281
  }, {
282
282
  condition: utils.isFunction(utils.URL),
283
- errorCode: 'window.URL',
284
- errorMsg: 'The window.URL API is not supported in your browser'
283
+ errorCode: 'globalThis.URL',
284
+ errorMsg: 'The globalThis.URL API is not supported in your browser'
285
285
  }, {
286
286
  condition: utils.isSupported.blob(),
287
- errorCode: 'window.Blob',
288
- errorMsg: 'The window.Blob File API is not supported in your browser'
287
+ errorCode: 'globalThis.Blob',
288
+ errorMsg: 'The globalThis.Blob File API is not supported in your browser'
289
289
  }, {
290
290
  condition: utils.isSupported.Uint8Array(),
291
- errorCode: 'window.Uint8Array',
292
- errorMsg: 'The window.Uint8Array function constructor is not supported in your browser'
291
+ errorCode: 'globalThis.Uint8Array',
292
+ errorMsg: 'The globalThis.Uint8Array function constructor is not supported in your browser'
293
293
  }, {
294
294
  condition: utils.isSupported.Uint32Array(),
295
- errorCode: 'window.Uint32Array',
296
- errorMsg: 'The window.Uint32Array function constructor is not supported in your browser'
295
+ errorCode: 'globalThis.Uint32Array',
296
+ errorMsg: 'The globalThis.Uint32Array function constructor is not supported in your browser'
297
297
  }],
298
298
  messages: {
299
299
  videoCodecs: {
@@ -1471,7 +1471,7 @@ function existingImages() {
1471
1471
  let imagesLength = obj.imagesLength;
1472
1472
  const skipObj = {
1473
1473
  getUserMedia: true,
1474
- 'window.URL': true
1474
+ 'globalThis.URL': true
1475
1475
  };
1476
1476
  const errorObj = error.validate(skipObj);
1477
1477
  const loadedImages = [];
@@ -2031,7 +2031,7 @@ function existingVideo() {
2031
2031
  const options = obj.options;
2032
2032
  const skipObj = {
2033
2033
  getUserMedia: true,
2034
- 'window.URL': true
2034
+ 'globalThis.URL': true
2035
2035
  };
2036
2036
  const errorObj = error.validate(skipObj);
2037
2037
  const loadedImages = 0;