@flow-player/software-decoder-ffmpeg 0.7.8 → 0.9.0
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.
|
@@ -228,16 +228,12 @@ async function loadFfmpegAssets() {
|
|
|
228
228
|
}
|
|
229
229
|
function resolveSoftwareDecoderWasmUrl(options) {
|
|
230
230
|
const explicit = options.wasmUrl;
|
|
231
|
-
if (typeof explicit
|
|
232
|
-
return explicit;
|
|
233
|
-
}
|
|
234
|
-
const url = globalThis.__FLOW_PLAYER_SOFTWARE_DECODER_WASM_URL__;
|
|
235
|
-
if (typeof url !== "string" || url.length === 0) {
|
|
231
|
+
if (typeof explicit !== "string" || explicit.length === 0) {
|
|
236
232
|
throw new Error(
|
|
237
233
|
"ffmpeg software decoder wasm URL missing: pass softwareDecoderWasmUrl (ffmpegSoftwareDecoderOptions provides it)"
|
|
238
234
|
);
|
|
239
235
|
}
|
|
240
|
-
return
|
|
236
|
+
return explicit;
|
|
241
237
|
}
|
|
242
238
|
async function instantiateFfmpegWasm(url, imports) {
|
|
243
239
|
if (typeof WebAssembly.instantiateStreaming === "function") {
|
package/dist/index.d.ts
CHANGED
|
@@ -21,9 +21,8 @@
|
|
|
21
21
|
* 真实 wasm 资产路径走。
|
|
22
22
|
*
|
|
23
23
|
* adapter 的 `createSoftwareVideoDecoder` options 支持可选 `wasmUrl`(显式
|
|
24
|
-
* 传参,runtime R4
|
|
25
|
-
* `
|
|
26
|
-
* 兼容,计划下个次版本移除)。
|
|
24
|
+
* 传参,runtime R4 起使用);未提供时 adapter 报错提示传入
|
|
25
|
+
* `softwareDecoderWasmUrl`。
|
|
27
26
|
*/
|
|
28
27
|
/** 软解 adapter 产物 URL(对应 FlowPlayerRuntimeOptions.softwareDecoderUrl)。 */
|
|
29
28
|
export declare const softwareDecoderUrl: string;
|
|
@@ -159,7 +159,6 @@ self.onmessage = (event) => {
|
|
|
159
159
|
if (!adapterUrl) {
|
|
160
160
|
throw new Error("init requires adapterUrl");
|
|
161
161
|
}
|
|
162
|
-
globalThis.__FLOW_PLAYER_SOFTWARE_DECODER_WASM_URL__ = message.wasmUrl;
|
|
163
162
|
const imported = await import(
|
|
164
163
|
/* @vite-ignore */
|
|
165
164
|
adapterUrl
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flow-player/software-decoder-ffmpeg",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "FFmpeg (ffdecoder) WASM software decode backend for @flow-player/browser-runtime: prebuilt adapter + decode worker, drop-in HEVC software decoding.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"esm",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"tag": "latest"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@flow-player/browser-runtime": "^0.
|
|
37
|
+
"@flow-player/browser-runtime": "^0.9.0"
|
|
38
38
|
}
|
|
39
39
|
}
|