@remotion/studio 4.0.371 → 4.0.372
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/can-decode.d.ts +1 -0
- package/dist/can-decode.js +24 -0
- package/dist/esm/chunk-bgfkgcmg.js +25 -0
- package/dist/esm/chunk-dbhfqh6h.js +42441 -0
- package/package.json +9 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const canDecode: (src: string) => Promise<boolean>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canDecode = void 0;
|
|
4
|
+
const mediabunny_1 = require("mediabunny");
|
|
5
|
+
const canDecode = async (src) => {
|
|
6
|
+
const input = new mediabunny_1.Input({
|
|
7
|
+
formats: mediabunny_1.ALL_FORMATS,
|
|
8
|
+
source: new mediabunny_1.UrlSource(src),
|
|
9
|
+
});
|
|
10
|
+
const videoTrack = await input.getPrimaryVideoTrack();
|
|
11
|
+
if (videoTrack) {
|
|
12
|
+
if (!(await videoTrack.canDecode())) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const audioTrack = await input.getPrimaryAudioTrack();
|
|
17
|
+
if (audioTrack) {
|
|
18
|
+
if (!(await audioTrack.canDecode())) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
};
|
|
24
|
+
exports.canDecode = canDecode;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
7
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
8
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
+
for (let key of __getOwnPropNames(mod))
|
|
10
|
+
if (!__hasOwnProp.call(to, key))
|
|
11
|
+
__defProp(to, key, {
|
|
12
|
+
get: () => mod[key],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
18
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
19
|
+
}) : x)(function(x) {
|
|
20
|
+
if (typeof require !== "undefined")
|
|
21
|
+
return require.apply(this, arguments);
|
|
22
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export { __toESM, __require };
|