@loaders.gl/video 3.4.14 → 3.4.15

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.
@@ -1,31 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = parseVideo;
8
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
- function parseVideo(_x) {
11
- return _parseVideo.apply(this, arguments);
12
- }
13
- function _parseVideo() {
14
- _parseVideo = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(arrayBuffer) {
15
- var blob, video;
16
- return _regenerator.default.wrap(function _callee$(_context) {
17
- while (1) switch (_context.prev = _context.next) {
18
- case 0:
19
- blob = new Blob([arrayBuffer]);
20
- video = document.createElement('video');
21
- video.src = URL.createObjectURL(blob);
22
- return _context.abrupt("return", video);
23
- case 4:
24
- case "end":
25
- return _context.stop();
26
- }
27
- }, _callee);
28
- }));
29
- return _parseVideo.apply(this, arguments);
7
+ async function parseVideo(arrayBuffer) {
8
+ const blob = new Blob([arrayBuffer]);
9
+ const video = document.createElement('video');
10
+ video.src = URL.createObjectURL(blob);
11
+ return video;
30
12
  }
31
13
  //# sourceMappingURL=parse-video.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-video.js","names":["parseVideo","_x","_parseVideo","apply","arguments","_asyncToGenerator2","default","_regenerator","mark","_callee","arrayBuffer","blob","video","wrap","_callee$","_context","prev","next","Blob","document","createElement","src","URL","createObjectURL","abrupt","stop"],"sources":["../../../../src/lib/parsers/parse-video.ts"],"sourcesContent":["// Parse to platform defined video type (HTMLVideoElement in browser)\nexport default async function parseVideo(arrayBuffer: ArrayBuffer): Promise<HTMLVideoElement> {\n // TODO It is probably somewhat inefficent to convert a File/Blob to ArrayBuffer and back\n // and could perhaps cause problems for large videos.\n // TODO MIME type is also lost from the File or Response...\n const blob = new Blob([arrayBuffer]);\n const video = document.createElement('video');\n video.src = URL.createObjectURL(blob);\n return video;\n}\n"],"mappings":";;;;;;;;;SAC8BA,UAAUA,CAAAC,EAAA;EAAA,OAAAC,WAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAAA,SAAAF,YAAA;EAAAA,WAAA,OAAAG,kBAAA,CAAAC,OAAA,EAAAC,YAAA,CAAAD,OAAA,CAAAE,IAAA,CAAzB,SAAAC,QAA0BC,WAAwB;IAAA,IAAAC,IAAA,EAAAC,KAAA;IAAA,OAAAL,YAAA,CAAAD,OAAA,CAAAO,IAAA,UAAAC,SAAAC,QAAA;MAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;QAAA;UAIzDN,IAAI,GAAG,IAAIO,IAAI,CAAC,CAACR,WAAW,CAAC,CAAC;UAC9BE,KAAK,GAAGO,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;UAC7CR,KAAK,CAACS,GAAG,GAAGC,GAAG,CAACC,eAAe,CAACZ,IAAI,CAAC;UAAC,OAAAI,QAAA,CAAAS,MAAA,WAC/BZ,KAAK;QAAA;QAAA;UAAA,OAAAG,QAAA,CAAAU,IAAA;MAAA;IAAA,GAAAhB,OAAA;EAAA,CACb;EAAA,OAAAP,WAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA"}
1
+ {"version":3,"file":"parse-video.js","names":["parseVideo","arrayBuffer","blob","Blob","video","document","createElement","src","URL","createObjectURL"],"sources":["../../../../src/lib/parsers/parse-video.ts"],"sourcesContent":["// Parse to platform defined video type (HTMLVideoElement in browser)\nexport default async function parseVideo(arrayBuffer: ArrayBuffer): Promise<HTMLVideoElement> {\n // TODO It is probably somewhat inefficent to convert a File/Blob to ArrayBuffer and back\n // and could perhaps cause problems for large videos.\n // TODO MIME type is also lost from the File or Response...\n const blob = new Blob([arrayBuffer]);\n const video = document.createElement('video');\n video.src = URL.createObjectURL(blob);\n return video;\n}\n"],"mappings":";;;;;;AACe,eAAeA,UAAUA,CAACC,WAAwB,EAA6B;EAI5F,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAAC,CAACF,WAAW,CAAC,CAAC;EACpC,MAAMG,KAAK,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;EAC7CF,KAAK,CAACG,GAAG,GAAGC,GAAG,CAACC,eAAe,CAACP,IAAI,CAAC;EACrC,OAAOE,KAAK;AACd"}
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports._typecheckVideoLoader = exports.VideoLoader = void 0;
8
8
  var _parseVideo = _interopRequireDefault(require("./lib/parsers/parse-video"));
9
- var VERSION = typeof "3.4.14" !== 'undefined' ? "3.4.14" : 'latest';
10
- var EXTENSIONS = ['mp4'];
11
- var MIME_TYPES = ['video/mp4'];
12
- var DEFAULT_LOADER_OPTIONS = {
9
+ const VERSION = typeof "3.4.15" !== 'undefined' ? "3.4.15" : 'latest';
10
+ const EXTENSIONS = ['mp4'];
11
+ const MIME_TYPES = ['video/mp4'];
12
+ const DEFAULT_LOADER_OPTIONS = {
13
13
  video: {}
14
14
  };
15
- var VideoLoader = {
15
+ const VideoLoader = {
16
16
  name: 'Video',
17
17
  id: 'video',
18
18
  module: 'video',
@@ -23,6 +23,6 @@ var VideoLoader = {
23
23
  options: DEFAULT_LOADER_OPTIONS
24
24
  };
25
25
  exports.VideoLoader = VideoLoader;
26
- var _typecheckVideoLoader = VideoLoader;
26
+ const _typecheckVideoLoader = VideoLoader;
27
27
  exports._typecheckVideoLoader = _typecheckVideoLoader;
28
28
  //# sourceMappingURL=video-loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"video-loader.js","names":["_parseVideo","_interopRequireDefault","require","VERSION","EXTENSIONS","MIME_TYPES","DEFAULT_LOADER_OPTIONS","video","VideoLoader","name","id","module","version","extensions","mimeTypes","parse","parseVideo","options","exports","_typecheckVideoLoader"],"sources":["../../src/video-loader.ts"],"sourcesContent":["import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport parseVideo from './lib/parsers/parse-video';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nconst EXTENSIONS = ['mp4'];\nconst MIME_TYPES = ['video/mp4'];\n\n// Loads a platform-specific image type that can be used as input data to WebGL textures\n\nexport type VideoLoaderOptions = LoaderOptions & {\n video: {};\n};\n\nconst DEFAULT_LOADER_OPTIONS: VideoLoaderOptions = {\n video: {}\n};\n\nexport const VideoLoader = {\n name: 'Video',\n id: 'video',\n module: 'video',\n version: VERSION,\n extensions: EXTENSIONS,\n mimeTypes: MIME_TYPES,\n\n parse: parseVideo,\n\n // tests: arrayBuffer => Boolean(getBinaryImageMetadata(new DataView(arrayBuffer))),\n options: DEFAULT_LOADER_OPTIONS\n};\n\nexport const _typecheckVideoLoader: LoaderWithParser = VideoLoader;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAMC,OAAO,GAAG,eAAkB,KAAK,WAAW,cAAiB,QAAQ;AAE3E,IAAMC,UAAU,GAAG,CAAC,KAAK,CAAC;AAC1B,IAAMC,UAAU,GAAG,CAAC,WAAW,CAAC;AAQhC,IAAMC,sBAA0C,GAAG;EACjDC,KAAK,EAAE,CAAC;AACV,CAAC;AAEM,IAAMC,WAAW,GAAG;EACzBC,IAAI,EAAE,OAAO;EACbC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,OAAO;EACfC,OAAO,EAAET,OAAO;EAChBU,UAAU,EAAET,UAAU;EACtBU,SAAS,EAAET,UAAU;EAErBU,KAAK,EAAEC,mBAAU;EAGjBC,OAAO,EAAEX;AACX,CAAC;AAACY,OAAA,CAAAV,WAAA,GAAAA,WAAA;AAEK,IAAMW,qBAAuC,GAAGX,WAAW;AAACU,OAAA,CAAAC,qBAAA,GAAAA,qBAAA"}
1
+ {"version":3,"file":"video-loader.js","names":["_parseVideo","_interopRequireDefault","require","VERSION","EXTENSIONS","MIME_TYPES","DEFAULT_LOADER_OPTIONS","video","VideoLoader","name","id","module","version","extensions","mimeTypes","parse","parseVideo","options","exports","_typecheckVideoLoader"],"sources":["../../src/video-loader.ts"],"sourcesContent":["import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport parseVideo from './lib/parsers/parse-video';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\nconst EXTENSIONS = ['mp4'];\nconst MIME_TYPES = ['video/mp4'];\n\n// Loads a platform-specific image type that can be used as input data to WebGL textures\n\nexport type VideoLoaderOptions = LoaderOptions & {\n video: {};\n};\n\nconst DEFAULT_LOADER_OPTIONS: VideoLoaderOptions = {\n video: {}\n};\n\nexport const VideoLoader = {\n name: 'Video',\n id: 'video',\n module: 'video',\n version: VERSION,\n extensions: EXTENSIONS,\n mimeTypes: MIME_TYPES,\n\n parse: parseVideo,\n\n // tests: arrayBuffer => Boolean(getBinaryImageMetadata(new DataView(arrayBuffer))),\n options: DEFAULT_LOADER_OPTIONS\n};\n\nexport const _typecheckVideoLoader: LoaderWithParser = VideoLoader;\n"],"mappings":";;;;;;;AACA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,MAAMC,OAAO,GAAG,eAAkB,KAAK,WAAW,cAAiB,QAAQ;AAE3E,MAAMC,UAAU,GAAG,CAAC,KAAK,CAAC;AAC1B,MAAMC,UAAU,GAAG,CAAC,WAAW,CAAC;AAQhC,MAAMC,sBAA0C,GAAG;EACjDC,KAAK,EAAE,CAAC;AACV,CAAC;AAEM,MAAMC,WAAW,GAAG;EACzBC,IAAI,EAAE,OAAO;EACbC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,OAAO;EACfC,OAAO,EAAET,OAAO;EAChBU,UAAU,EAAET,UAAU;EACtBU,SAAS,EAAET,UAAU;EAErBU,KAAK,EAAEC,mBAAU;EAGjBC,OAAO,EAAEX;AACX,CAAC;AAACY,OAAA,CAAAV,WAAA,GAAAA,WAAA;AAEK,MAAMW,qBAAuC,GAAGX,WAAW;AAACU,OAAA,CAAAC,qBAAA,GAAAA,qBAAA"}
@@ -1,5 +1,5 @@
1
1
  import parseVideo from './lib/parsers/parse-video';
2
- const VERSION = typeof "3.4.14" !== 'undefined' ? "3.4.14" : 'latest';
2
+ const VERSION = typeof "3.4.15" !== 'undefined' ? "3.4.15" : 'latest';
3
3
  const EXTENSIONS = ['mp4'];
4
4
  const MIME_TYPES = ['video/mp4'];
5
5
  const DEFAULT_LOADER_OPTIONS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/video",
3
- "version": "3.4.14",
3
+ "version": "3.4.15",
4
4
  "description": "Framework-independent loaders and writers for video (MP4, WEBM, ...)",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -32,9 +32,9 @@
32
32
  "build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
33
33
  },
34
34
  "dependencies": {
35
- "@loaders.gl/loader-utils": "3.4.14",
36
- "@loaders.gl/worker-utils": "3.4.14",
35
+ "@loaders.gl/loader-utils": "3.4.15",
36
+ "@loaders.gl/worker-utils": "3.4.15",
37
37
  "gifshot": "^0.4.5"
38
38
  },
39
- "gitHead": "dffa197c6ae79bac5277d5e8a132f4cd274e74e5"
39
+ "gitHead": "19e941d5805568e449ef9092490d6568a4853298"
40
40
  }