avbridge 2.9.0 → 2.10.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 +31 -0
- package/dist/{chunk-SN4WZE24.js → chunk-3GKM5DFM.js} +42 -5
- package/dist/chunk-3GKM5DFM.js.map +1 -0
- package/dist/{chunk-EY6DZEDT.cjs → chunk-NQULEIA3.cjs} +42 -5
- package/dist/chunk-NQULEIA3.cjs.map +1 -0
- package/dist/element-browser.js +40 -3
- package/dist/element-browser.js.map +1 -1
- package/dist/element.cjs +2 -2
- package/dist/element.d.cts +1 -1
- package/dist/element.d.ts +1 -1
- package/dist/element.js +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{player-DEcidWk6.d.cts → player-DDdNVFDv.d.cts} +23 -1
- package/dist/{player-DEcidWk6.d.ts → player-DDdNVFDv.d.ts} +23 -1
- package/dist/player.cjs +230 -98
- package/dist/player.cjs.map +1 -1
- package/dist/player.d.cts +27 -0
- package/dist/player.d.ts +27 -0
- package/dist/player.js +230 -98
- package/dist/player.js.map +1 -1
- package/package.json +1 -1
- package/src/element/avbridge-player.ts +150 -75
- package/src/element/player-styles.ts +85 -35
- package/src/index.ts +1 -0
- package/src/strategies/fallback/audio-output.ts +29 -4
- package/src/strategies/fallback/index.ts +12 -0
- package/src/strategies/hybrid/index.ts +9 -0
- package/src/types.ts +25 -0
- package/dist/chunk-EY6DZEDT.cjs.map +0 -1
- package/dist/chunk-SN4WZE24.js.map +0 -1
package/dist/element.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNQULEIA3_cjs = require('./chunk-NQULEIA3.cjs');
|
|
4
4
|
require('./chunk-S4WAZC2T.cjs');
|
|
5
5
|
require('./chunk-BYGZN4Z5.cjs');
|
|
6
6
|
require('./chunk-2IJ66NTD.cjs');
|
|
@@ -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 chunkNQULEIA3_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,
|
|
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-DDdNVFDv.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,
|
|
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-DDdNVFDv.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `<avbridge-video>` — `HTMLMediaElement`-compatible primitive backed by the
|
package/dist/element.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkOTFS7DC4_cjs = require('./chunk-OTFS7DC4.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkNQULEIA3_cjs = require('./chunk-NQULEIA3.cjs');
|
|
5
5
|
var chunkS4WAZC2T_cjs = require('./chunk-S4WAZC2T.cjs');
|
|
6
6
|
var chunkBYGZN4Z5_cjs = require('./chunk-BYGZN4Z5.cjs');
|
|
7
7
|
var chunk2IJ66NTD_cjs = require('./chunk-2IJ66NTD.cjs');
|
|
@@ -763,31 +763,31 @@ Object.defineProperty(exports, "remux", {
|
|
|
763
763
|
});
|
|
764
764
|
Object.defineProperty(exports, "FALLBACK_AUDIO_CODECS", {
|
|
765
765
|
enumerable: true,
|
|
766
|
-
get: function () { return
|
|
766
|
+
get: function () { return chunkNQULEIA3_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 chunkNQULEIA3_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 chunkNQULEIA3_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 chunkNQULEIA3_cjs.NATIVE_VIDEO_CODECS; }
|
|
779
779
|
});
|
|
780
780
|
Object.defineProperty(exports, "UnifiedPlayer", {
|
|
781
781
|
enumerable: true,
|
|
782
|
-
get: function () { return
|
|
782
|
+
get: function () { return chunkNQULEIA3_cjs.UnifiedPlayer; }
|
|
783
783
|
});
|
|
784
784
|
Object.defineProperty(exports, "classify", {
|
|
785
785
|
enumerable: true,
|
|
786
|
-
get: function () { return
|
|
786
|
+
get: function () { return chunkNQULEIA3_cjs.classifyContext; }
|
|
787
787
|
});
|
|
788
788
|
Object.defineProperty(exports, "createPlayer", {
|
|
789
789
|
enumerable: true,
|
|
790
|
-
get: function () { return
|
|
790
|
+
get: function () { return chunkNQULEIA3_cjs.createPlayer; }
|
|
791
791
|
});
|
|
792
792
|
Object.defineProperty(exports, "srtToVtt", {
|
|
793
793
|
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
|
|
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-DDdNVFDv.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-DDdNVFDv.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
|
|
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-DDdNVFDv.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-DDdNVFDv.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Codecs we know `<video>` and MSE support across modern desktop + Android.
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mimeForFormat, generateFilename, createOutputFormat } from './chunk-CL6UEUQF.js';
|
|
2
2
|
export { remux } from './chunk-CL6UEUQF.js';
|
|
3
|
-
export { FALLBACK_AUDIO_CODECS, FALLBACK_VIDEO_CODECS, NATIVE_AUDIO_CODECS, NATIVE_VIDEO_CODECS, UnifiedPlayer, classifyContext as classify, createPlayer } from './chunk-
|
|
3
|
+
export { FALLBACK_AUDIO_CODECS, FALLBACK_VIDEO_CODECS, NATIVE_AUDIO_CODECS, NATIVE_VIDEO_CODECS, UnifiedPlayer, classifyContext as classify, createPlayer } from './chunk-3GKM5DFM.js';
|
|
4
4
|
export { srtToVtt } from './chunk-5KVLE6YI.js';
|
|
5
5
|
import { probe, buildMediabunnySourceFromInput } from './chunk-GYIJU44C.js';
|
|
6
6
|
export { probe } from './chunk-GYIJU44C.js';
|
|
@@ -401,6 +401,28 @@ interface ConvertResult {
|
|
|
401
401
|
*/
|
|
402
402
|
notes?: string[];
|
|
403
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* Configuration for a custom settings section added to `<avbridge-player>`
|
|
406
|
+
* via {@link addSettingsSection}. Sections render in the bottom-sheet
|
|
407
|
+
* settings panel alongside built-in sections (Speed, Audio, Subtitles,
|
|
408
|
+
* Fit, Stats for Nerds). The player owns rendering — consumers describe
|
|
409
|
+
* data; avbridge renders it in a consistent visual style.
|
|
410
|
+
*/
|
|
411
|
+
interface SettingsSectionConfig {
|
|
412
|
+
/** Unique id for this section. Used to update/remove later. */
|
|
413
|
+
id: string;
|
|
414
|
+
/** Display label (e.g. "Quality", "Translate"). */
|
|
415
|
+
label: string;
|
|
416
|
+
/** Items to show when the section is expanded. */
|
|
417
|
+
items: Array<{
|
|
418
|
+
id: string;
|
|
419
|
+
label: string;
|
|
420
|
+
/** Mark the currently-selected item. */
|
|
421
|
+
active?: boolean;
|
|
422
|
+
}>;
|
|
423
|
+
/** Called when the user picks an item. */
|
|
424
|
+
onSelect(itemId: string): void;
|
|
425
|
+
}
|
|
404
426
|
|
|
405
427
|
declare class UnifiedPlayer {
|
|
406
428
|
private readonly options;
|
|
@@ -480,4 +502,4 @@ declare class UnifiedPlayer {
|
|
|
480
502
|
}
|
|
481
503
|
declare function createPlayer(options: CreatePlayerOptions): Promise<UnifiedPlayer>;
|
|
482
504
|
|
|
483
|
-
export { type AudioCodec as A, type Classification as C, type DiagnosticsSnapshot as D, type FetchFn as F, type HardwareAccelerationHint as H, type MediaContext as M, type OutputAudioCodec as O, type PlaybackSession as P, type
|
|
505
|
+
export { type AudioCodec as A, type Classification as C, type DiagnosticsSnapshot as D, type FetchFn as F, type HardwareAccelerationHint as H, type MediaContext as M, type OutputAudioCodec as O, type PlaybackSession as P, type SettingsSectionConfig as S, type TransportConfig as T, UnifiedPlayer as U, type VideoCodec as V, type MediaInput as a, type ConvertOptions as b, type ConvertResult as c, type TranscodeOptions as d, type AudioTrackInfo as e, type ContainerKind as f, type CreatePlayerOptions as g, type OutputFormat as h, type OutputVideoCodec as i, type PlayerEventMap as j, type PlayerEventName as k, type Plugin as l, type ProgressInfo as m, type StrategyClass as n, type StrategyName as o, type SubtitleTrackInfo as p, type TranscodeQuality as q, type VideoTrackInfo as r, createPlayer as s, type AvbridgeVideoElementEventMap as t };
|
|
@@ -401,6 +401,28 @@ interface ConvertResult {
|
|
|
401
401
|
*/
|
|
402
402
|
notes?: string[];
|
|
403
403
|
}
|
|
404
|
+
/**
|
|
405
|
+
* Configuration for a custom settings section added to `<avbridge-player>`
|
|
406
|
+
* via {@link addSettingsSection}. Sections render in the bottom-sheet
|
|
407
|
+
* settings panel alongside built-in sections (Speed, Audio, Subtitles,
|
|
408
|
+
* Fit, Stats for Nerds). The player owns rendering — consumers describe
|
|
409
|
+
* data; avbridge renders it in a consistent visual style.
|
|
410
|
+
*/
|
|
411
|
+
interface SettingsSectionConfig {
|
|
412
|
+
/** Unique id for this section. Used to update/remove later. */
|
|
413
|
+
id: string;
|
|
414
|
+
/** Display label (e.g. "Quality", "Translate"). */
|
|
415
|
+
label: string;
|
|
416
|
+
/** Items to show when the section is expanded. */
|
|
417
|
+
items: Array<{
|
|
418
|
+
id: string;
|
|
419
|
+
label: string;
|
|
420
|
+
/** Mark the currently-selected item. */
|
|
421
|
+
active?: boolean;
|
|
422
|
+
}>;
|
|
423
|
+
/** Called when the user picks an item. */
|
|
424
|
+
onSelect(itemId: string): void;
|
|
425
|
+
}
|
|
404
426
|
|
|
405
427
|
declare class UnifiedPlayer {
|
|
406
428
|
private readonly options;
|
|
@@ -480,4 +502,4 @@ declare class UnifiedPlayer {
|
|
|
480
502
|
}
|
|
481
503
|
declare function createPlayer(options: CreatePlayerOptions): Promise<UnifiedPlayer>;
|
|
482
504
|
|
|
483
|
-
export { type AudioCodec as A, type Classification as C, type DiagnosticsSnapshot as D, type FetchFn as F, type HardwareAccelerationHint as H, type MediaContext as M, type OutputAudioCodec as O, type PlaybackSession as P, type
|
|
505
|
+
export { type AudioCodec as A, type Classification as C, type DiagnosticsSnapshot as D, type FetchFn as F, type HardwareAccelerationHint as H, type MediaContext as M, type OutputAudioCodec as O, type PlaybackSession as P, type SettingsSectionConfig as S, type TransportConfig as T, UnifiedPlayer as U, type VideoCodec as V, type MediaInput as a, type ConvertOptions as b, type ConvertResult as c, type TranscodeOptions as d, type AudioTrackInfo as e, type ContainerKind as f, type CreatePlayerOptions as g, type OutputFormat as h, type OutputVideoCodec as i, type PlayerEventMap as j, type PlayerEventName as k, type Plugin as l, type ProgressInfo as m, type StrategyClass as n, type StrategyName as o, type SubtitleTrackInfo as p, type TranscodeQuality as q, type VideoTrackInfo as r, createPlayer as s, type AvbridgeVideoElementEventMap as t };
|