avbridge 2.11.0 → 2.12.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.
- package/CHANGELOG.md +35 -0
- package/dist/{avi-B5CQYB7L.cjs → avi-EQE6AR75.cjs} +4 -4
- package/dist/{avi-2ILLBNPQ.cjs.map → avi-EQE6AR75.cjs.map} +1 -1
- package/dist/{avi-RWWPN2PR.js → avi-NNHH4AAA.js} +3 -3
- package/dist/{avi-JXU4GQL2.js.map → avi-NNHH4AAA.js.map} +1 -1
- package/dist/{avi-JXU4GQL2.js → avi-S7EY54YA.js} +3 -3
- package/dist/{avi-RWWPN2PR.js.map → avi-S7EY54YA.js.map} +1 -1
- package/dist/{avi-2ILLBNPQ.cjs → avi-Y3N325WZ.cjs} +4 -4
- package/dist/{avi-B5CQYB7L.cjs.map → avi-Y3N325WZ.cjs.map} +1 -1
- package/dist/{chunk-GYIJU44C.js → chunk-2LNXMGT6.js} +5 -5
- package/dist/{chunk-GYIJU44C.js.map → chunk-2LNXMGT6.js.map} +1 -1
- package/dist/{chunk-DCSOQH2N.js → chunk-3AI5WFFN.js} +40 -16
- package/dist/chunk-3AI5WFFN.js.map +1 -0
- package/dist/{chunk-2NSOOMXW.js → chunk-3YKWU4FM.js} +3 -3
- package/dist/{chunk-2NSOOMXW.js.map → chunk-3YKWU4FM.js.map} +1 -1
- package/dist/{chunk-CL6UEUQF.js → chunk-5Y5BTB5D.js} +5 -5
- package/dist/{chunk-CL6UEUQF.js.map → chunk-5Y5BTB5D.js.map} +1 -1
- package/dist/{chunk-37UOSAVI.cjs → chunk-7EF4VTUS.cjs} +23 -23
- package/dist/{chunk-IHNHHEA2.js.map → chunk-7EF4VTUS.cjs.map} +1 -1
- package/dist/{chunk-OTFS7DC4.cjs → chunk-GJBNLPGI.cjs} +14 -14
- package/dist/{chunk-OTFS7DC4.cjs.map → chunk-GJBNLPGI.cjs.map} +1 -1
- package/dist/{chunk-BYGZN4Z5.cjs → chunk-HBHSUGNI.cjs} +5 -5
- package/dist/{chunk-BYGZN4Z5.cjs.map → chunk-HBHSUGNI.cjs.map} +1 -1
- package/dist/{chunk-L7A3ECI2.cjs → chunk-HZUVMXBN.cjs} +4 -4
- package/dist/{chunk-L7A3ECI2.cjs.map → chunk-HZUVMXBN.cjs.map} +1 -1
- package/dist/{chunk-Z33SBWL5.cjs → chunk-YPZFGJV3.cjs} +40 -16
- package/dist/chunk-YPZFGJV3.cjs.map +1 -0
- package/dist/{chunk-IHNHHEA2.js → chunk-Z26PXRUY.js} +9 -9
- package/dist/chunk-Z26PXRUY.js.map +1 -0
- package/dist/element-browser.js +42 -18
- package/dist/element-browser.js.map +1 -1
- package/dist/element.cjs +5 -5
- package/dist/element.d.cts +1 -1
- package/dist/element.d.ts +1 -1
- package/dist/element.js +4 -4
- package/dist/index.cjs +21 -21
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/dist/{libav-demux-3N5Y3VQA.cjs → libav-demux-575OYCT2.cjs} +9 -9
- package/dist/{libav-demux-3N5Y3VQA.cjs.map → libav-demux-575OYCT2.cjs.map} +1 -1
- package/dist/{libav-demux-JXD4OTLM.js → libav-demux-SXZDLC7W.js} +4 -4
- package/dist/{libav-demux-JXD4OTLM.js.map → libav-demux-SXZDLC7W.js.map} +1 -1
- package/dist/libav-http-reader-2S5HAHW4.js +3 -0
- package/dist/{libav-http-reader-WXG3Z7AI.js.map → libav-http-reader-2S5HAHW4.js.map} +1 -1
- package/dist/libav-http-reader-Q356EO2K.cjs +16 -0
- package/dist/{libav-http-reader-AZLE7YFS.cjs.map → libav-http-reader-Q356EO2K.cjs.map} +1 -1
- package/dist/{player-DDdNVFDv.d.cts → player-bQ6n4hVp.d.cts} +15 -0
- package/dist/{player-DDdNVFDv.d.ts → player-bQ6n4hVp.d.ts} +15 -0
- package/dist/player.cjs +60 -15
- package/dist/player.cjs.map +1 -1
- package/dist/player.d.cts +21 -0
- package/dist/player.d.ts +21 -0
- package/dist/player.js +60 -15
- package/dist/player.js.map +1 -1
- package/dist/remux-7TA4FKTY.js +10 -0
- package/dist/{remux-56V7LDAD.js.map → remux-7TA4FKTY.js.map} +1 -1
- package/dist/remux-VPKCLHHM.cjs +35 -0
- package/dist/{remux-KUS5GIL6.cjs.map → remux-VPKCLHHM.cjs.map} +1 -1
- package/package.json +1 -1
- package/src/element/avbridge-player.ts +36 -8
- package/src/element/player-styles.ts +13 -1
- package/src/player.ts +3 -3
- package/src/types.ts +15 -0
- package/src/util/libav-http-reader.ts +58 -19
- package/dist/chunk-37UOSAVI.cjs.map +0 -1
- package/dist/chunk-DCSOQH2N.js.map +0 -1
- package/dist/chunk-Z33SBWL5.cjs.map +0 -1
- package/dist/libav-http-reader-AZLE7YFS.cjs +0 -16
- package/dist/libav-http-reader-WXG3Z7AI.js +0 -3
- package/dist/remux-56V7LDAD.js +0 -10
- package/dist/remux-KUS5GIL6.cjs +0 -35
package/dist/element.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7EF4VTUS_cjs = require('./chunk-7EF4VTUS.cjs');
|
|
4
4
|
require('./chunk-WRKO6Q42.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-HBHSUGNI.cjs');
|
|
6
6
|
require('./chunk-2IJ66NTD.cjs');
|
|
7
7
|
require('./chunk-QDJLQR53.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-HZUVMXBN.cjs');
|
|
9
|
+
require('./chunk-YPZFGJV3.cjs');
|
|
10
10
|
require('./chunk-G4APZMCP.cjs');
|
|
11
11
|
require('./chunk-F3LQJKXK.cjs');
|
|
12
12
|
|
|
@@ -296,7 +296,7 @@ var AvbridgeVideoElement = class extends HTMLElementCtor {
|
|
|
296
296
|
this._dispatch("loadstart", {});
|
|
297
297
|
let player;
|
|
298
298
|
try {
|
|
299
|
-
player = await
|
|
299
|
+
player = await chunk7EF4VTUS_cjs.createPlayer({
|
|
300
300
|
source,
|
|
301
301
|
target: this._videoEl,
|
|
302
302
|
// Honor the consumer's preferred initial strategy. "auto" means
|
package/dist/element.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MediaInput, o as StrategyName, n as StrategyClass, U as UnifiedPlayer, e as AudioTrackInfo, p as SubtitleTrackInfo, D as DiagnosticsSnapshot, t as AvbridgeVideoElementEventMap } from './player-
|
|
1
|
+
import { a as MediaInput, o as StrategyName, n as StrategyClass, U as UnifiedPlayer, e as AudioTrackInfo, p as SubtitleTrackInfo, D as DiagnosticsSnapshot, t as AvbridgeVideoElementEventMap } from './player-bQ6n4hVp.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `<avbridge-video>` — `HTMLMediaElement`-compatible primitive backed by the
|
package/dist/element.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MediaInput, o as StrategyName, n as StrategyClass, U as UnifiedPlayer, e as AudioTrackInfo, p as SubtitleTrackInfo, D as DiagnosticsSnapshot, t as AvbridgeVideoElementEventMap } from './player-
|
|
1
|
+
import { a as MediaInput, o as StrategyName, n as StrategyClass, U as UnifiedPlayer, e as AudioTrackInfo, p as SubtitleTrackInfo, D as DiagnosticsSnapshot, t as AvbridgeVideoElementEventMap } from './player-bQ6n4hVp.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `<avbridge-video>` — `HTMLMediaElement`-compatible primitive backed by the
|
package/dist/element.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createPlayer } from './chunk-
|
|
1
|
+
import { createPlayer } from './chunk-Z26PXRUY.js';
|
|
2
2
|
import './chunk-EDDWAN2L.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-2LNXMGT6.js';
|
|
4
4
|
import './chunk-CPJLFFCC.js';
|
|
5
5
|
import './chunk-LUFA47FP.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-3YKWU4FM.js';
|
|
7
|
+
import './chunk-3AI5WFFN.js';
|
|
8
8
|
import './chunk-5DMTJVIU.js';
|
|
9
9
|
import './chunk-5YAWWKA3.js';
|
|
10
10
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkGJBNLPGI_cjs = require('./chunk-GJBNLPGI.cjs');
|
|
4
|
+
var chunk7EF4VTUS_cjs = require('./chunk-7EF4VTUS.cjs');
|
|
5
5
|
var chunkWRKO6Q42_cjs = require('./chunk-WRKO6Q42.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkHBHSUGNI_cjs = require('./chunk-HBHSUGNI.cjs');
|
|
7
7
|
var chunk2IJ66NTD_cjs = require('./chunk-2IJ66NTD.cjs');
|
|
8
8
|
require('./chunk-QDJLQR53.cjs');
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-HZUVMXBN.cjs');
|
|
10
|
+
require('./chunk-YPZFGJV3.cjs');
|
|
11
11
|
require('./chunk-G4APZMCP.cjs');
|
|
12
12
|
require('./chunk-F3LQJKXK.cjs');
|
|
13
13
|
|
|
@@ -35,9 +35,9 @@ async function transcodeViaLibav(ctx, options) {
|
|
|
35
35
|
{ createOutputFormat: createOutputFormat2, mimeForFormat: mimeForFormat2, generateFilename: generateFilename2 }
|
|
36
36
|
] = await Promise.all([
|
|
37
37
|
import('mediabunny'),
|
|
38
|
-
import('./libav-demux-
|
|
38
|
+
import('./libav-demux-575OYCT2.cjs'),
|
|
39
39
|
import('./source-VFLXLOCN.cjs'),
|
|
40
|
-
import('./remux-
|
|
40
|
+
import('./remux-VPKCLHHM.cjs')
|
|
41
41
|
]);
|
|
42
42
|
const normalized = await normalizeSource(ctx.source);
|
|
43
43
|
const demux = await openLibavDemux({
|
|
@@ -535,7 +535,7 @@ async function transcode(source, options = {}) {
|
|
|
535
535
|
const quality = options.quality ?? "medium";
|
|
536
536
|
validateCodecCompatibility(outputFormat, videoCodec, audioCodec);
|
|
537
537
|
options.signal?.throwIfAborted();
|
|
538
|
-
const ctx = await
|
|
538
|
+
const ctx = await chunkHBHSUGNI_cjs.probe(source);
|
|
539
539
|
options.signal?.throwIfAborted();
|
|
540
540
|
if (isLibavTranscodeContainer(ctx.container)) {
|
|
541
541
|
return transcodeViaLibav(ctx, options);
|
|
@@ -552,7 +552,7 @@ async function transcode(source, options = {}) {
|
|
|
552
552
|
async function attemptTranscode(ctx, outputFormat, videoCodec, audioCodec, quality, options) {
|
|
553
553
|
const mb = await import('mediabunny');
|
|
554
554
|
const input = new mb.Input({
|
|
555
|
-
source: await
|
|
555
|
+
source: await chunkHBHSUGNI_cjs.buildMediabunnySourceFromInput(mb, ctx.source),
|
|
556
556
|
formats: mb.ALL_FORMATS
|
|
557
557
|
});
|
|
558
558
|
let bytesWritten = 0;
|
|
@@ -566,7 +566,7 @@ async function attemptTranscode(ctx, outputFormat, videoCodec, audioCodec, quali
|
|
|
566
566
|
}
|
|
567
567
|
})) : null;
|
|
568
568
|
const output = new mb.Output({
|
|
569
|
-
format:
|
|
569
|
+
format: chunkGJBNLPGI_cjs.createOutputFormat(mb, outputFormat),
|
|
570
570
|
target: streamTarget ?? bufferTarget
|
|
571
571
|
});
|
|
572
572
|
const videoOptions = options.dropVideo ? { discard: true } : {
|
|
@@ -657,8 +657,8 @@ async function doTranscode(ctx, outputFormat, videoCodec, audioCodec, quality, o
|
|
|
657
657
|
await new Promise((r) => setTimeout(r, 50 * (attempt + 1)));
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
|
-
const mimeType =
|
|
661
|
-
const filename =
|
|
660
|
+
const mimeType = chunkGJBNLPGI_cjs.mimeForFormat(outputFormat);
|
|
661
|
+
const filename = chunkGJBNLPGI_cjs.generateFilename(ctx.name, outputFormat);
|
|
662
662
|
if (options.outputStream) {
|
|
663
663
|
options.onProgress?.({ percent: 100, bytesWritten: 0 });
|
|
664
664
|
return {
|
|
@@ -759,35 +759,35 @@ function qualityToMediabunny2(mb, quality) {
|
|
|
759
759
|
|
|
760
760
|
Object.defineProperty(exports, "remux", {
|
|
761
761
|
enumerable: true,
|
|
762
|
-
get: function () { return
|
|
762
|
+
get: function () { return chunkGJBNLPGI_cjs.remux; }
|
|
763
763
|
});
|
|
764
764
|
Object.defineProperty(exports, "FALLBACK_AUDIO_CODECS", {
|
|
765
765
|
enumerable: true,
|
|
766
|
-
get: function () { return
|
|
766
|
+
get: function () { return chunk7EF4VTUS_cjs.FALLBACK_AUDIO_CODECS; }
|
|
767
767
|
});
|
|
768
768
|
Object.defineProperty(exports, "FALLBACK_VIDEO_CODECS", {
|
|
769
769
|
enumerable: true,
|
|
770
|
-
get: function () { return
|
|
770
|
+
get: function () { return chunk7EF4VTUS_cjs.FALLBACK_VIDEO_CODECS; }
|
|
771
771
|
});
|
|
772
772
|
Object.defineProperty(exports, "NATIVE_AUDIO_CODECS", {
|
|
773
773
|
enumerable: true,
|
|
774
|
-
get: function () { return
|
|
774
|
+
get: function () { return chunk7EF4VTUS_cjs.NATIVE_AUDIO_CODECS; }
|
|
775
775
|
});
|
|
776
776
|
Object.defineProperty(exports, "NATIVE_VIDEO_CODECS", {
|
|
777
777
|
enumerable: true,
|
|
778
|
-
get: function () { return
|
|
778
|
+
get: function () { return chunk7EF4VTUS_cjs.NATIVE_VIDEO_CODECS; }
|
|
779
779
|
});
|
|
780
780
|
Object.defineProperty(exports, "UnifiedPlayer", {
|
|
781
781
|
enumerable: true,
|
|
782
|
-
get: function () { return
|
|
782
|
+
get: function () { return chunk7EF4VTUS_cjs.UnifiedPlayer; }
|
|
783
783
|
});
|
|
784
784
|
Object.defineProperty(exports, "classify", {
|
|
785
785
|
enumerable: true,
|
|
786
|
-
get: function () { return
|
|
786
|
+
get: function () { return chunk7EF4VTUS_cjs.classifyContext; }
|
|
787
787
|
});
|
|
788
788
|
Object.defineProperty(exports, "createPlayer", {
|
|
789
789
|
enumerable: true,
|
|
790
|
-
get: function () { return
|
|
790
|
+
get: function () { return chunk7EF4VTUS_cjs.createPlayer; }
|
|
791
791
|
});
|
|
792
792
|
Object.defineProperty(exports, "srtToVtt", {
|
|
793
793
|
enumerable: true,
|
|
@@ -795,7 +795,7 @@ Object.defineProperty(exports, "srtToVtt", {
|
|
|
795
795
|
});
|
|
796
796
|
Object.defineProperty(exports, "probe", {
|
|
797
797
|
enumerable: true,
|
|
798
|
-
get: function () { return
|
|
798
|
+
get: function () { return chunkHBHSUGNI_cjs.probe; }
|
|
799
799
|
});
|
|
800
800
|
Object.defineProperty(exports, "AvbridgeError", {
|
|
801
801
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AudioCodec, V as VideoCodec, M as MediaContext, C as Classification, a as MediaInput, T as TransportConfig, b as ConvertOptions, c as ConvertResult, d as TranscodeOptions } from './player-
|
|
2
|
-
export { e as AudioTrackInfo, f as ContainerKind, g as CreatePlayerOptions, D as DiagnosticsSnapshot, F as FetchFn, H as HardwareAccelerationHint, O as OutputAudioCodec, h as OutputFormat, i as OutputVideoCodec, P as PlaybackSession, j as PlayerEventMap, k as PlayerEventName, l as Plugin, m as ProgressInfo, S as SettingsSectionConfig, n as StrategyClass, o as StrategyName, p as SubtitleTrackInfo, q as TranscodeQuality, U as UnifiedPlayer, r as VideoTrackInfo, s as createPlayer } from './player-
|
|
1
|
+
import { A as AudioCodec, V as VideoCodec, M as MediaContext, C as Classification, a as MediaInput, T as TransportConfig, b as ConvertOptions, c as ConvertResult, d as TranscodeOptions } from './player-bQ6n4hVp.cjs';
|
|
2
|
+
export { e as AudioTrackInfo, f as ContainerKind, g as CreatePlayerOptions, D as DiagnosticsSnapshot, F as FetchFn, H as HardwareAccelerationHint, O as OutputAudioCodec, h as OutputFormat, i as OutputVideoCodec, P as PlaybackSession, j as PlayerEventMap, k as PlayerEventName, l as Plugin, m as ProgressInfo, S as SettingsSectionConfig, n as StrategyClass, o as StrategyName, p as SubtitleTrackInfo, q as TranscodeQuality, U as UnifiedPlayer, r as VideoTrackInfo, s as createPlayer } from './player-bQ6n4hVp.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Codecs we know `<video>` and MSE support across modern desktop + Android.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AudioCodec, V as VideoCodec, M as MediaContext, C as Classification, a as MediaInput, T as TransportConfig, b as ConvertOptions, c as ConvertResult, d as TranscodeOptions } from './player-
|
|
2
|
-
export { e as AudioTrackInfo, f as ContainerKind, g as CreatePlayerOptions, D as DiagnosticsSnapshot, F as FetchFn, H as HardwareAccelerationHint, O as OutputAudioCodec, h as OutputFormat, i as OutputVideoCodec, P as PlaybackSession, j as PlayerEventMap, k as PlayerEventName, l as Plugin, m as ProgressInfo, S as SettingsSectionConfig, n as StrategyClass, o as StrategyName, p as SubtitleTrackInfo, q as TranscodeQuality, U as UnifiedPlayer, r as VideoTrackInfo, s as createPlayer } from './player-
|
|
1
|
+
import { A as AudioCodec, V as VideoCodec, M as MediaContext, C as Classification, a as MediaInput, T as TransportConfig, b as ConvertOptions, c as ConvertResult, d as TranscodeOptions } from './player-bQ6n4hVp.js';
|
|
2
|
+
export { e as AudioTrackInfo, f as ContainerKind, g as CreatePlayerOptions, D as DiagnosticsSnapshot, F as FetchFn, H as HardwareAccelerationHint, O as OutputAudioCodec, h as OutputFormat, i as OutputVideoCodec, P as PlaybackSession, j as PlayerEventMap, k as PlayerEventName, l as Plugin, m as ProgressInfo, S as SettingsSectionConfig, n as StrategyClass, o as StrategyName, p as SubtitleTrackInfo, q as TranscodeQuality, U as UnifiedPlayer, r as VideoTrackInfo, s as createPlayer } from './player-bQ6n4hVp.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Codecs we know `<video>` and MSE support across modern desktop + Android.
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { mimeForFormat, generateFilename, createOutputFormat } from './chunk-
|
|
2
|
-
export { remux } from './chunk-
|
|
3
|
-
export { FALLBACK_AUDIO_CODECS, FALLBACK_VIDEO_CODECS, NATIVE_AUDIO_CODECS, NATIVE_VIDEO_CODECS, UnifiedPlayer, classifyContext as classify, createPlayer } from './chunk-
|
|
1
|
+
import { mimeForFormat, generateFilename, createOutputFormat } from './chunk-5Y5BTB5D.js';
|
|
2
|
+
export { remux } from './chunk-5Y5BTB5D.js';
|
|
3
|
+
export { FALLBACK_AUDIO_CODECS, FALLBACK_VIDEO_CODECS, NATIVE_AUDIO_CODECS, NATIVE_VIDEO_CODECS, UnifiedPlayer, classifyContext as classify, createPlayer } from './chunk-Z26PXRUY.js';
|
|
4
4
|
export { srtToVtt } from './chunk-EDDWAN2L.js';
|
|
5
|
-
import { probe, buildMediabunnySourceFromInput } from './chunk-
|
|
6
|
-
export { probe } from './chunk-
|
|
5
|
+
import { probe, buildMediabunnySourceFromInput } from './chunk-2LNXMGT6.js';
|
|
6
|
+
export { probe } from './chunk-2LNXMGT6.js';
|
|
7
7
|
import { AvbridgeError, ERR_CONTAINER_NOT_SUPPORTED, ERR_TRANSCODE_UNSUPPORTED_COMBO, ERR_TRANSCODE_ABORTED, ERR_TRANSCODE_DECODE, ERR_CODEC_NOT_SUPPORTED } from './chunk-CPJLFFCC.js';
|
|
8
8
|
export { AvbridgeError, ERR_ALL_STRATEGIES_EXHAUSTED, ERR_CODEC_NOT_SUPPORTED, ERR_FETCH_FAILED, ERR_LIBAV_NOT_REACHABLE, ERR_MSE_CODEC_NOT_SUPPORTED, ERR_MSE_NOT_SUPPORTED, ERR_PLAYER_NOT_READY, ERR_PROBE_FAILED, ERR_PROBE_FETCH_FAILED, ERR_PROBE_UNKNOWN_CONTAINER, ERR_RANGE_NOT_SUPPORTED, ERR_STRATEGY_FAILED } from './chunk-CPJLFFCC.js';
|
|
9
9
|
import './chunk-LUFA47FP.js';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
10
|
+
import './chunk-3YKWU4FM.js';
|
|
11
|
+
import './chunk-3AI5WFFN.js';
|
|
12
12
|
import './chunk-5DMTJVIU.js';
|
|
13
13
|
import './chunk-5YAWWKA3.js';
|
|
14
14
|
|
|
@@ -36,9 +36,9 @@ async function transcodeViaLibav(ctx, options) {
|
|
|
36
36
|
{ createOutputFormat: createOutputFormat2, mimeForFormat: mimeForFormat2, generateFilename: generateFilename2 }
|
|
37
37
|
] = await Promise.all([
|
|
38
38
|
import('mediabunny'),
|
|
39
|
-
import('./libav-demux-
|
|
39
|
+
import('./libav-demux-SXZDLC7W.js'),
|
|
40
40
|
import('./source-4TZ6KMNV.js'),
|
|
41
|
-
import('./remux-
|
|
41
|
+
import('./remux-7TA4FKTY.js')
|
|
42
42
|
]);
|
|
43
43
|
const normalized = await normalizeSource(ctx.source);
|
|
44
44
|
const demux = await openLibavDemux({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkHZUVMXBN_cjs = require('./chunk-HZUVMXBN.cjs');
|
|
4
|
+
require('./chunk-YPZFGJV3.cjs');
|
|
5
5
|
require('./chunk-G4APZMCP.cjs');
|
|
6
6
|
require('./chunk-F3LQJKXK.cjs');
|
|
7
7
|
|
|
@@ -9,23 +9,23 @@ require('./chunk-F3LQJKXK.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "libavFrameToInterleavedFloat32", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkHZUVMXBN_cjs.libavFrameToInterleavedFloat32; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "openLibavDemux", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkHZUVMXBN_cjs.openLibavDemux; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "packetPtsSec", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkHZUVMXBN_cjs.packetPtsSec; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "sanitizeFrameTimestamp", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkHZUVMXBN_cjs.sanitizeFrameTimestamp; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "sanitizePacketTimestamp", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkHZUVMXBN_cjs.sanitizePacketTimestamp; }
|
|
29
29
|
});
|
|
30
|
-
//# sourceMappingURL=libav-demux-
|
|
31
|
-
//# sourceMappingURL=libav-demux-
|
|
30
|
+
//# sourceMappingURL=libav-demux-575OYCT2.cjs.map
|
|
31
|
+
//# sourceMappingURL=libav-demux-575OYCT2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"libav-demux-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"libav-demux-575OYCT2.cjs"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { libavFrameToInterleavedFloat32, openLibavDemux, packetPtsSec, sanitizeFrameTimestamp, sanitizePacketTimestamp } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { libavFrameToInterleavedFloat32, openLibavDemux, packetPtsSec, sanitizeFrameTimestamp, sanitizePacketTimestamp } from './chunk-3YKWU4FM.js';
|
|
2
|
+
import './chunk-3AI5WFFN.js';
|
|
3
3
|
import './chunk-5DMTJVIU.js';
|
|
4
4
|
import './chunk-5YAWWKA3.js';
|
|
5
|
-
//# sourceMappingURL=libav-demux-
|
|
6
|
-
//# sourceMappingURL=libav-demux-
|
|
5
|
+
//# sourceMappingURL=libav-demux-SXZDLC7W.js.map
|
|
6
|
+
//# sourceMappingURL=libav-demux-SXZDLC7W.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"libav-demux-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"libav-demux-SXZDLC7W.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"libav-http-reader-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"libav-http-reader-2S5HAHW4.js"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYPZFGJV3_cjs = require('./chunk-YPZFGJV3.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "attachLibavHttpReader", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkYPZFGJV3_cjs.attachLibavHttpReader; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "prepareLibavInput", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkYPZFGJV3_cjs.prepareLibavInput; }
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=libav-http-reader-Q356EO2K.cjs.map
|
|
16
|
+
//# sourceMappingURL=libav-http-reader-Q356EO2K.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"libav-http-reader-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"libav-http-reader-Q356EO2K.cjs"}
|
|
@@ -219,6 +219,14 @@ interface CreatePlayerOptions {
|
|
|
219
219
|
* for interceptors, logging, or environments without a global fetch.
|
|
220
220
|
*/
|
|
221
221
|
fetchFn?: FetchFn;
|
|
222
|
+
/**
|
|
223
|
+
* Byte budget for the libav HTTP reader's LRU cache of fetched ranges.
|
|
224
|
+
* Defaults to 8 MB. Set to `0` to disable caching. Raise this when the
|
|
225
|
+
* app plays seek-heavy legacy-container media from URLs — hot regions
|
|
226
|
+
* (header/moov, tail index, current window) stay resident instead of
|
|
227
|
+
* being re-fetched on every bounce.
|
|
228
|
+
*/
|
|
229
|
+
cacheBytes?: number;
|
|
222
230
|
}
|
|
223
231
|
/** Signature-compatible with `globalThis.fetch`. */
|
|
224
232
|
type FetchFn = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
@@ -226,6 +234,13 @@ type FetchFn = (input: RequestInfo | URL, init?: RequestInit) => Promise<Respons
|
|
|
226
234
|
interface TransportConfig {
|
|
227
235
|
requestInit?: RequestInit;
|
|
228
236
|
fetchFn?: FetchFn;
|
|
237
|
+
/**
|
|
238
|
+
* Byte budget for the libav HTTP reader's LRU cache of fetched ranges.
|
|
239
|
+
* Defaults to 8 MB. Set to `0` to disable caching entirely. Higher
|
|
240
|
+
* values help seek-heavy network playback keep hot regions
|
|
241
|
+
* (header/moov, tail index, current read) resident.
|
|
242
|
+
*/
|
|
243
|
+
cacheBytes?: number;
|
|
229
244
|
}
|
|
230
245
|
/** Events emitted by {@link UnifiedPlayer}. Strongly typed. */
|
|
231
246
|
interface PlayerEventMap {
|
|
@@ -219,6 +219,14 @@ interface CreatePlayerOptions {
|
|
|
219
219
|
* for interceptors, logging, or environments without a global fetch.
|
|
220
220
|
*/
|
|
221
221
|
fetchFn?: FetchFn;
|
|
222
|
+
/**
|
|
223
|
+
* Byte budget for the libav HTTP reader's LRU cache of fetched ranges.
|
|
224
|
+
* Defaults to 8 MB. Set to `0` to disable caching. Raise this when the
|
|
225
|
+
* app plays seek-heavy legacy-container media from URLs — hot regions
|
|
226
|
+
* (header/moov, tail index, current window) stay resident instead of
|
|
227
|
+
* being re-fetched on every bounce.
|
|
228
|
+
*/
|
|
229
|
+
cacheBytes?: number;
|
|
222
230
|
}
|
|
223
231
|
/** Signature-compatible with `globalThis.fetch`. */
|
|
224
232
|
type FetchFn = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
@@ -226,6 +234,13 @@ type FetchFn = (input: RequestInfo | URL, init?: RequestInit) => Promise<Respons
|
|
|
226
234
|
interface TransportConfig {
|
|
227
235
|
requestInit?: RequestInit;
|
|
228
236
|
fetchFn?: FetchFn;
|
|
237
|
+
/**
|
|
238
|
+
* Byte budget for the libav HTTP reader's LRU cache of fetched ranges.
|
|
239
|
+
* Defaults to 8 MB. Set to `0` to disable caching entirely. Higher
|
|
240
|
+
* values help seek-heavy network playback keep hot regions
|
|
241
|
+
* (header/moov, tail index, current read) resident.
|
|
242
|
+
*/
|
|
243
|
+
cacheBytes?: number;
|
|
229
244
|
}
|
|
230
245
|
/** Events emitted by {@link UnifiedPlayer}. Strongly typed. */
|
|
231
246
|
interface PlayerEventMap {
|
package/dist/player.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunk2XW2O3YI_cjs = require('./chunk-2XW2O3YI.cjs');
|
|
4
4
|
var chunkNNVOHKXJ_cjs = require('./chunk-NNVOHKXJ.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-YPZFGJV3.cjs');
|
|
6
6
|
var chunkWRKO6Q42_cjs = require('./chunk-WRKO6Q42.cjs');
|
|
7
7
|
require('./chunk-QDJLQR53.cjs');
|
|
8
8
|
|
|
@@ -239,7 +239,7 @@ async function probe(source, transport) {
|
|
|
239
239
|
const hasUnknownCodec = result.videoTracks.some((t) => t.codec === "unknown") || result.audioTracks.some((t) => t.codec === "unknown");
|
|
240
240
|
if (hasUnknownCodec) {
|
|
241
241
|
try {
|
|
242
|
-
const { probeWithLibav } = await import('./avi-
|
|
242
|
+
const { probeWithLibav } = await import('./avi-Y3N325WZ.cjs');
|
|
243
243
|
return await probeWithLibav(normalized, sniffed);
|
|
244
244
|
} catch {
|
|
245
245
|
return result;
|
|
@@ -252,7 +252,7 @@ async function probe(source, transport) {
|
|
|
252
252
|
mediabunnyErr.message
|
|
253
253
|
);
|
|
254
254
|
try {
|
|
255
|
-
const { probeWithLibav } = await import('./avi-
|
|
255
|
+
const { probeWithLibav } = await import('./avi-Y3N325WZ.cjs');
|
|
256
256
|
return await probeWithLibav(normalized, sniffed);
|
|
257
257
|
} catch (libavErr) {
|
|
258
258
|
const mbMsg = mediabunnyErr.message || String(mediabunnyErr);
|
|
@@ -266,7 +266,7 @@ async function probe(source, transport) {
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
try {
|
|
269
|
-
const { probeWithLibav } = await import('./avi-
|
|
269
|
+
const { probeWithLibav } = await import('./avi-Y3N325WZ.cjs');
|
|
270
270
|
return await probeWithLibav(normalized, sniffed);
|
|
271
271
|
} catch (err) {
|
|
272
272
|
const inner = err instanceof Error ? err.message : String(err);
|
|
@@ -2023,7 +2023,7 @@ async function startHybridDecoder(opts) {
|
|
|
2023
2023
|
const variant = pickLibavVariant(opts.context);
|
|
2024
2024
|
const libav = await chunkNNVOHKXJ_cjs.loadLibav(variant);
|
|
2025
2025
|
const bridge = await loadBridge();
|
|
2026
|
-
const { prepareLibavInput } = await import('./libav-http-reader-
|
|
2026
|
+
const { prepareLibavInput } = await import('./libav-http-reader-Q356EO2K.cjs');
|
|
2027
2027
|
const inputHandle = await prepareLibavInput(libav, opts.filename, opts.source, opts.transport);
|
|
2028
2028
|
const readPkt = await libav.av_packet_alloc();
|
|
2029
2029
|
const [fmt_ctx, streams] = await libav.ff_init_demuxer_file(opts.filename);
|
|
@@ -2693,7 +2693,7 @@ async function startDecoder(opts) {
|
|
|
2693
2693
|
const variant = "avbridge";
|
|
2694
2694
|
const libav = await chunkNNVOHKXJ_cjs.loadLibav(variant);
|
|
2695
2695
|
const bridge = await loadBridge2();
|
|
2696
|
-
const { prepareLibavInput } = await import('./libav-http-reader-
|
|
2696
|
+
const { prepareLibavInput } = await import('./libav-http-reader-Q356EO2K.cjs');
|
|
2697
2697
|
const inputHandle = await prepareLibavInput(libav, opts.filename, opts.source, opts.transport);
|
|
2698
2698
|
const readPkt = await libav.av_packet_alloc();
|
|
2699
2699
|
const [fmt_ctx, streams] = await libav.ff_init_demuxer_file(opts.filename);
|
|
@@ -3422,9 +3422,9 @@ var UnifiedPlayer = class _UnifiedPlayer {
|
|
|
3422
3422
|
constructor(options, registry) {
|
|
3423
3423
|
this.options = options;
|
|
3424
3424
|
this.registry = registry;
|
|
3425
|
-
const { requestInit, fetchFn } = options;
|
|
3426
|
-
if (requestInit || fetchFn) {
|
|
3427
|
-
this.transport = { requestInit, fetchFn };
|
|
3425
|
+
const { requestInit, fetchFn, cacheBytes } = options;
|
|
3426
|
+
if (requestInit || fetchFn || cacheBytes !== void 0) {
|
|
3427
|
+
this.transport = { requestInit, fetchFn, cacheBytes };
|
|
3428
3428
|
}
|
|
3429
3429
|
}
|
|
3430
3430
|
options;
|
|
@@ -5035,6 +5035,12 @@ var PLAYER_STYLES = (
|
|
|
5035
5035
|
display: flex;
|
|
5036
5036
|
align-items: center;
|
|
5037
5037
|
cursor: pointer;
|
|
5038
|
+
/* Claim all touch gestures on the seek bar. Without this, Android
|
|
5039
|
+
* browsers (Chrome, Samsung Internet) treat horizontal drags as
|
|
5040
|
+
* scroll candidates and cancel pointermove once the gesture
|
|
5041
|
+
* resolves, breaking scrub. touch-action must be set in CSS \u2014
|
|
5042
|
+
* preventDefault() on pointerdown is too late. */
|
|
5043
|
+
touch-action: none;
|
|
5038
5044
|
}
|
|
5039
5045
|
|
|
5040
5046
|
.avp-seek-track {
|
|
@@ -5052,7 +5058,13 @@ var PLAYER_STYLES = (
|
|
|
5052
5058
|
|
|
5053
5059
|
.avp-seek-buffered {
|
|
5054
5060
|
position: absolute;
|
|
5055
|
-
|
|
5061
|
+
inset: 0;
|
|
5062
|
+
pointer-events: none;
|
|
5063
|
+
}
|
|
5064
|
+
|
|
5065
|
+
.avp-seek-buffered-range {
|
|
5066
|
+
position: absolute;
|
|
5067
|
+
top: 0;
|
|
5056
5068
|
height: 100%;
|
|
5057
5069
|
background: rgba(255, 255, 255, 0.35);
|
|
5058
5070
|
border-radius: inherit;
|
|
@@ -5612,6 +5624,7 @@ var AvbridgePlayerElement = class _AvbridgePlayerElement extends HTMLElement {
|
|
|
5612
5624
|
on(this._video, "ended", () => this._setState("ended"));
|
|
5613
5625
|
on(this._video, "error", () => this._setState("error"));
|
|
5614
5626
|
on(this._video, "timeupdate", () => this._updateTime());
|
|
5627
|
+
on(this._video, "progress", () => this._updateBuffered());
|
|
5615
5628
|
on(this._video, "volumechange", () => this._updateVolume());
|
|
5616
5629
|
on(this._video, "trackschange", () => this._buildSettingsMenu());
|
|
5617
5630
|
on(this._video, "durationchange", () => {
|
|
@@ -5828,13 +5841,45 @@ var AvbridgePlayerElement = class _AvbridgePlayerElement extends HTMLElement {
|
|
|
5828
5841
|
this._seekInput.value = String(t);
|
|
5829
5842
|
this._updateSeekVisuals(t);
|
|
5830
5843
|
this._timeDisplay.textContent = `${formatTime(t)} / ${formatTime(d)}`;
|
|
5844
|
+
this._updateBuffered();
|
|
5845
|
+
}
|
|
5846
|
+
/**
|
|
5847
|
+
* Render every buffered range as its own segment so gaps (common on MSE
|
|
5848
|
+
* after seeks) are visible. Not gated by `_userSeeking` — ranges should
|
|
5849
|
+
* keep updating while the user scrubs, and runs cheaply on `progress`.
|
|
5850
|
+
*/
|
|
5851
|
+
_updateBuffered() {
|
|
5852
|
+
const d = this._video.duration;
|
|
5853
|
+
if (!(d > 0)) return;
|
|
5854
|
+
let buf;
|
|
5831
5855
|
try {
|
|
5832
|
-
|
|
5833
|
-
if (buf && buf.length > 0 && d > 0) {
|
|
5834
|
-
const end = buf.end(buf.length - 1);
|
|
5835
|
-
this._seekBuffered.style.width = `${end / d * 100}%`;
|
|
5836
|
-
}
|
|
5856
|
+
buf = this._video.buffered;
|
|
5837
5857
|
} catch {
|
|
5858
|
+
return;
|
|
5859
|
+
}
|
|
5860
|
+
const count = buf ? buf.length : 0;
|
|
5861
|
+
const host = this._seekBuffered;
|
|
5862
|
+
while (host.childElementCount > count) host.lastElementChild.remove();
|
|
5863
|
+
while (host.childElementCount < count) {
|
|
5864
|
+
const seg = document.createElement("div");
|
|
5865
|
+
seg.className = "avp-seek-buffered-range";
|
|
5866
|
+
host.appendChild(seg);
|
|
5867
|
+
}
|
|
5868
|
+
for (let i = 0; i < count; i++) {
|
|
5869
|
+
let start;
|
|
5870
|
+
let end;
|
|
5871
|
+
try {
|
|
5872
|
+
start = buf.start(i);
|
|
5873
|
+
end = buf.end(i);
|
|
5874
|
+
} catch {
|
|
5875
|
+
continue;
|
|
5876
|
+
}
|
|
5877
|
+
const s = Math.max(0, start);
|
|
5878
|
+
const e = Math.min(d, end);
|
|
5879
|
+
if (e <= s) continue;
|
|
5880
|
+
const seg = host.children[i];
|
|
5881
|
+
seg.style.left = `${s / d * 100}%`;
|
|
5882
|
+
seg.style.width = `${(e - s) / d * 100}%`;
|
|
5838
5883
|
}
|
|
5839
5884
|
}
|
|
5840
5885
|
// ── Controls: volume ───────────────────────────────────────────────────
|