@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.
- package/dist/dist.min.js +18 -18
- package/dist/es5/lib/gifshot/gifshot.js +18 -18
- package/dist/es5/lib/gifshot/gifshot.js.map +1 -1
- package/dist/es5/video-loader.js +1 -1
- package/dist/esm/lib/gifshot/gifshot.js +18 -18
- package/dist/esm/lib/gifshot/gifshot.js.map +1 -1
- package/dist/esm/video-loader.js +1 -1
- package/dist/lib/gifshot/gifshot.js +26 -26
- package/package.json +4 -4
- package/src/lib/gifshot/gifshot.ts +26 -26
- package/dist/es5/lib/utils/globals.js +0 -33
- package/dist/es5/lib/utils/globals.js.map +0 -1
- package/dist/esm/lib/utils/globals.js +0 -16
- package/dist/esm/lib/utils/globals.js.map +0 -1
- package/dist/lib/utils/globals.d.ts +0 -10
- package/dist/lib/utils/globals.d.ts.map +0 -1
- package/dist/lib/utils/globals.js +0 -25
- package/src/lib/utils/globals.ts +0 -25
package/dist/es5/video-loader.js
CHANGED
|
@@ -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.
|
|
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:
|
|
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:
|
|
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:
|
|
29
|
+
Blob: globalThis.Blob || globalThis.BlobBuilder || globalThis.WebKitBlobBuilder || globalThis.MozBlobBuilder || globalThis.MSBlobBuilder,
|
|
30
30
|
btoa: function () {
|
|
31
|
-
const btoa =
|
|
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(
|
|
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
|
|
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
|
|
97
|
+
return globalThis.Uint8Array;
|
|
98
98
|
},
|
|
99
99
|
Uint32Array: function Uint32Array() {
|
|
100
|
-
return
|
|
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: '
|
|
284
|
-
errorMsg: 'The
|
|
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: '
|
|
288
|
-
errorMsg: 'The
|
|
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: '
|
|
292
|
-
errorMsg: 'The
|
|
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: '
|
|
296
|
-
errorMsg: 'The
|
|
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
|
-
'
|
|
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
|
-
'
|
|
2034
|
+
'globalThis.URL': true
|
|
2035
2035
|
};
|
|
2036
2036
|
const errorObj = error.validate(skipObj);
|
|
2037
2037
|
const loadedImages = 0;
|