@loaders.gl/video 3.2.3 → 3.3.0-alpha.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.
package/dist/dist.min.js CHANGED
@@ -763,7 +763,7 @@
763
763
  let imagesLength = obj.imagesLength;
764
764
  const skipObj = {
765
765
  getUserMedia: true,
766
- "window.URL": true
766
+ "globalThis.URL": true
767
767
  };
768
768
  const errorObj = error.validate(skipObj);
769
769
  const loadedImages = [];
@@ -894,7 +894,7 @@
894
894
  const options = obj.options;
895
895
  const skipObj = {
896
896
  getUserMedia: true,
897
- "window.URL": true
897
+ "globalThis.URL": true
898
898
  };
899
899
  const errorObj = error.validate(skipObj);
900
900
  const loadedImages = 0;
@@ -1017,12 +1017,12 @@
1017
1017
  var init_gifshot = __esm({
1018
1018
  "src/lib/gifshot/gifshot.ts"() {
1019
1019
  utils = {
1020
- URL: window.URL || window.webkitURL || window.mozURL || window.msURL,
1020
+ URL: globalThis.URL || globalThis.webkitURL || globalThis.mozURL || globalThis.msURL,
1021
1021
  getUserMedia: function() {
1022
1022
  const getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
1023
1023
  return getUserMedia ? getUserMedia.bind(navigator) : getUserMedia;
1024
1024
  }(),
1025
- requestAnimFrame: window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame,
1025
+ requestAnimFrame: globalThis.requestAnimationFrame || globalThis.webkitRequestAnimationFrame || globalThis.mozRequestAnimationFrame || globalThis.oRequestAnimationFrame || globalThis.msRequestAnimationFrame,
1026
1026
  requestTimeout: function requestTimeout(callback, delay) {
1027
1027
  callback = callback || utils.noop;
1028
1028
  delay = delay || 0;
@@ -1040,9 +1040,9 @@
1040
1040
  handle.value = requestAnimFrame(loop);
1041
1041
  return handle;
1042
1042
  },
1043
- Blob: window.Blob || window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder,
1043
+ Blob: globalThis.Blob || globalThis.BlobBuilder || globalThis.WebKitBlobBuilder || globalThis.MozBlobBuilder || globalThis.MSBlobBuilder,
1044
1044
  btoa: function() {
1045
- const btoa = window.btoa || function(input) {
1045
+ const btoa = globalThis.btoa || function(input) {
1046
1046
  let output = "";
1047
1047
  let i = 0;
1048
1048
  const l = input.length;
@@ -1071,7 +1071,7 @@
1071
1071
  }
1072
1072
  return output;
1073
1073
  };
1074
- return btoa ? btoa.bind(window) : utils.noop;
1074
+ return btoa ? btoa.bind(globalThis) : utils.noop;
1075
1075
  }(),
1076
1076
  isObject: function isObject(obj) {
1077
1077
  return obj && Object.prototype.toString.call(obj) === "[object Object]";
@@ -1097,16 +1097,16 @@
1097
1097
  return el && el.getContext && el.getContext("2d");
1098
1098
  },
1099
1099
  webworkers: function webworkers() {
1100
- return window.Worker;
1100
+ return globalThis.Worker;
1101
1101
  },
1102
1102
  blob: function blob() {
1103
1103
  return utils.Blob;
1104
1104
  },
1105
1105
  Uint8Array: function Uint8Array2() {
1106
- return window.Uint8Array;
1106
+ return globalThis.Uint8Array;
1107
1107
  },
1108
1108
  Uint32Array: function Uint32Array2() {
1109
- return window.Uint32Array;
1109
+ return globalThis.Uint32Array;
1110
1110
  },
1111
1111
  videoCodecs: function() {
1112
1112
  const testEl = document.createElement("video");
@@ -1281,23 +1281,23 @@
1281
1281
  },
1282
1282
  {
1283
1283
  condition: utils.isFunction(utils.URL),
1284
- errorCode: "window.URL",
1285
- errorMsg: "The window.URL API is not supported in your browser"
1284
+ errorCode: "globalThis.URL",
1285
+ errorMsg: "The globalThis.URL API is not supported in your browser"
1286
1286
  },
1287
1287
  {
1288
1288
  condition: utils.isSupported.blob(),
1289
- errorCode: "window.Blob",
1290
- errorMsg: "The window.Blob File API is not supported in your browser"
1289
+ errorCode: "globalThis.Blob",
1290
+ errorMsg: "The globalThis.Blob File API is not supported in your browser"
1291
1291
  },
1292
1292
  {
1293
1293
  condition: utils.isSupported.Uint8Array(),
1294
- errorCode: "window.Uint8Array",
1295
- errorMsg: "The window.Uint8Array function constructor is not supported in your browser"
1294
+ errorCode: "globalThis.Uint8Array",
1295
+ errorMsg: "The globalThis.Uint8Array function constructor is not supported in your browser"
1296
1296
  },
1297
1297
  {
1298
1298
  condition: utils.isSupported.Uint32Array(),
1299
- errorCode: "window.Uint32Array",
1300
- errorMsg: "The window.Uint32Array function constructor is not supported in your browser"
1299
+ errorCode: "globalThis.Uint32Array",
1300
+ errorMsg: "The globalThis.Uint32Array function constructor is not supported in your browser"
1301
1301
  }
1302
1302
  ],
1303
1303
  messages: {
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var utils = {
8
- URL: window.URL || window.webkitURL || window.mozURL || window.msURL,
8
+ URL: globalThis.URL || globalThis.webkitURL || globalThis.mozURL || globalThis.msURL,
9
9
  getUserMedia: function () {
10
10
  var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
11
11
  return getUserMedia ? getUserMedia.bind(navigator) : getUserMedia;
12
12
  }(),
13
- requestAnimFrame: window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame,
13
+ requestAnimFrame: globalThis.requestAnimationFrame || globalThis.webkitRequestAnimationFrame || globalThis.mozRequestAnimationFrame || globalThis.oRequestAnimationFrame || globalThis.msRequestAnimationFrame,
14
14
  requestTimeout: function requestTimeout(callback, delay) {
15
15
  callback = callback || utils.noop;
16
16
  delay = delay || 0;
@@ -32,9 +32,9 @@ var utils = {
32
32
  handle.value = requestAnimFrame(loop);
33
33
  return handle;
34
34
  },
35
- Blob: window.Blob || window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder,
35
+ Blob: globalThis.Blob || globalThis.BlobBuilder || globalThis.WebKitBlobBuilder || globalThis.MozBlobBuilder || globalThis.MSBlobBuilder,
36
36
  btoa: function () {
37
- var btoa = window.btoa || function (input) {
37
+ var btoa = globalThis.btoa || function (input) {
38
38
  var output = '';
39
39
  var i = 0;
40
40
  var l = input.length;
@@ -68,7 +68,7 @@ var utils = {
68
68
  return output;
69
69
  };
70
70
 
71
- return btoa ? btoa.bind(window) : utils.noop;
71
+ return btoa ? btoa.bind(globalThis) : utils.noop;
72
72
  }(),
73
73
  isObject: function isObject(obj) {
74
74
  return obj && Object.prototype.toString.call(obj) === '[object Object]';
@@ -94,16 +94,16 @@ var utils = {
94
94
  return el && el.getContext && el.getContext('2d');
95
95
  },
96
96
  webworkers: function webworkers() {
97
- return window.Worker;
97
+ return globalThis.Worker;
98
98
  },
99
99
  blob: function blob() {
100
100
  return utils.Blob;
101
101
  },
102
102
  Uint8Array: function Uint8Array() {
103
- return window.Uint8Array;
103
+ return globalThis.Uint8Array;
104
104
  },
105
105
  Uint32Array: function Uint32Array() {
106
- return window.Uint32Array;
106
+ return globalThis.Uint32Array;
107
107
  },
108
108
  videoCodecs: function () {
109
109
  var testEl = document.createElement('video');
@@ -286,20 +286,20 @@ var error = {
286
286
  errorMsg: 'The Web Workers API is not supported in your browser'
287
287
  }, {
288
288
  condition: utils.isFunction(utils.URL),
289
- errorCode: 'window.URL',
290
- errorMsg: 'The window.URL API is not supported in your browser'
289
+ errorCode: 'globalThis.URL',
290
+ errorMsg: 'The globalThis.URL API is not supported in your browser'
291
291
  }, {
292
292
  condition: utils.isSupported.blob(),
293
- errorCode: 'window.Blob',
294
- errorMsg: 'The window.Blob File API is not supported in your browser'
293
+ errorCode: 'globalThis.Blob',
294
+ errorMsg: 'The globalThis.Blob File API is not supported in your browser'
295
295
  }, {
296
296
  condition: utils.isSupported.Uint8Array(),
297
- errorCode: 'window.Uint8Array',
298
- errorMsg: 'The window.Uint8Array function constructor is not supported in your browser'
297
+ errorCode: 'globalThis.Uint8Array',
298
+ errorMsg: 'The globalThis.Uint8Array function constructor is not supported in your browser'
299
299
  }, {
300
300
  condition: utils.isSupported.Uint32Array(),
301
- errorCode: 'window.Uint32Array',
302
- errorMsg: 'The window.Uint32Array function constructor is not supported in your browser'
301
+ errorCode: 'globalThis.Uint32Array',
302
+ errorMsg: 'The globalThis.Uint32Array function constructor is not supported in your browser'
303
303
  }],
304
304
  messages: {
305
305
  videoCodecs: {
@@ -1477,7 +1477,7 @@ function existingImages() {
1477
1477
  var imagesLength = obj.imagesLength;
1478
1478
  var skipObj = {
1479
1479
  getUserMedia: true,
1480
- 'window.URL': true
1480
+ 'globalThis.URL': true
1481
1481
  };
1482
1482
  var errorObj = error.validate(skipObj);
1483
1483
  var loadedImages = [];
@@ -2037,7 +2037,7 @@ function existingVideo() {
2037
2037
  var options = obj.options;
2038
2038
  var skipObj = {
2039
2039
  getUserMedia: true,
2040
- 'window.URL': true
2040
+ 'globalThis.URL': true
2041
2041
  };
2042
2042
  var errorObj = error.validate(skipObj);
2043
2043
  var loadedImages = 0;