@broadcastingplatforms/player 1.4.3 → 1.4.5
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/bp-player.js +118 -118
- package/dist/bp-player.mjs +121 -121
- package/dist/bp-player.standalone.mjs +80 -80
- package/dist/components/bp-default-ui.d.ts +1 -1
- package/dist/components/bp-error-display.d.ts +1 -1
- package/dist/components/bp-overlay.d.ts +1 -1
- package/dist/components/bp-player.d.ts +1 -1
- package/dist/core/player-core.d.ts +19 -0
- package/dist/elements/hls-video.d.ts +7 -0
- package/dist/elements/livekit-video.d.ts +7 -0
- package/dist/elements/nano-video.d.ts +7 -0
- package/package.json +1 -2
|
@@ -63,6 +63,6 @@ export declare class BPDefaultUI extends LitElement {
|
|
|
63
63
|
private setupPlayer;
|
|
64
64
|
private setupPlayerListeners;
|
|
65
65
|
private renderDefaultControls;
|
|
66
|
-
protected render(): import("lit").TemplateResult<1>;
|
|
66
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
67
67
|
}
|
|
68
68
|
//# sourceMappingURL=bp-default-ui.d.ts.map
|
|
@@ -24,7 +24,7 @@ export declare class BPErrorDisplay extends LitElement {
|
|
|
24
24
|
static styles: import("lit").CSSResult;
|
|
25
25
|
error: PlayerError | null;
|
|
26
26
|
showCode: boolean;
|
|
27
|
-
render(): import("lit").TemplateResult<1> | null;
|
|
27
|
+
render(): import("lit-html").TemplateResult<1> | null;
|
|
28
28
|
private renderIcon;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=bp-error-display.d.ts.map
|
|
@@ -23,7 +23,7 @@ export declare class BPOverlay extends LitElement {
|
|
|
23
23
|
buttonMode: boolean;
|
|
24
24
|
private getIcon;
|
|
25
25
|
private getDefaultMessage;
|
|
26
|
-
render(): import("lit").TemplateResult<1> | null;
|
|
26
|
+
render(): import("lit-html").TemplateResult<1> | null;
|
|
27
27
|
private renderIcon;
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=bp-overlay.d.ts.map
|
|
@@ -82,6 +82,6 @@ export declare class BPPlayer extends LitElement {
|
|
|
82
82
|
private clearVideoDimensions;
|
|
83
83
|
private getContainerClasses;
|
|
84
84
|
private getContainerStyle;
|
|
85
|
-
protected render(): import("lit").TemplateResult<1>;
|
|
85
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
86
86
|
}
|
|
87
87
|
//# sourceMappingURL=bp-player.d.ts.map
|
|
@@ -73,6 +73,17 @@ export interface PlayerCoreEventMap {
|
|
|
73
73
|
videoelementchange: {
|
|
74
74
|
video: HTMLVideoElement | null;
|
|
75
75
|
};
|
|
76
|
+
/**
|
|
77
|
+
* Fires when the inner playback <video> element changes. For HLS this
|
|
78
|
+
* is the wrapper's `nativeEl` and matches `videoelementchange`. For
|
|
79
|
+
* Nano and LiveKit, the wrapper exposes a placeholder `nativeEl` and
|
|
80
|
+
* binds the real playback element asynchronously — this event fires
|
|
81
|
+
* once that real element is available, and again when it goes away.
|
|
82
|
+
* Analytics integrations (e.g. mux-embed) should listen here.
|
|
83
|
+
*/
|
|
84
|
+
activevideoelementchange: {
|
|
85
|
+
video: HTMLVideoElement | null;
|
|
86
|
+
};
|
|
76
87
|
error: PlayerError;
|
|
77
88
|
destroy: void;
|
|
78
89
|
statechange: {
|
|
@@ -99,6 +110,12 @@ export interface SourceLoadResult {
|
|
|
99
110
|
export interface PlayerCore {
|
|
100
111
|
readonly state: PlayerState;
|
|
101
112
|
readonly videoElement: HTMLVideoElement | null;
|
|
113
|
+
/**
|
|
114
|
+
* The actively playing inner <video>, distinct from the wrapper. For
|
|
115
|
+
* Nano/LiveKit, this is null until the provider binds its real video
|
|
116
|
+
* element. Analytics integrations should monitor this.
|
|
117
|
+
*/
|
|
118
|
+
readonly activeVideoElement: HTMLVideoElement | null;
|
|
102
119
|
readonly bpLive: BPLiveService | null;
|
|
103
120
|
readonly network: NetworkInterceptorController;
|
|
104
121
|
/** Whether the player is ready (attached and can accept sources) */
|
|
@@ -148,6 +165,7 @@ export declare class PlayerCoreImpl implements PlayerCore {
|
|
|
148
165
|
constructor();
|
|
149
166
|
get state(): PlayerState;
|
|
150
167
|
get videoElement(): HTMLVideoElement | null;
|
|
168
|
+
get activeVideoElement(): HTMLVideoElement | null;
|
|
151
169
|
get bpLive(): BPLiveService | null;
|
|
152
170
|
get network(): NetworkInterceptorController;
|
|
153
171
|
get ready(): boolean;
|
|
@@ -164,6 +182,7 @@ export declare class PlayerCoreImpl implements PlayerCore {
|
|
|
164
182
|
private destroyMediaElement;
|
|
165
183
|
private createMediaElement;
|
|
166
184
|
private attachMediaElementListeners;
|
|
185
|
+
private attachActiveVideoElementForwarding;
|
|
167
186
|
private handleMediaEvent;
|
|
168
187
|
unloadSource(): void;
|
|
169
188
|
play(): Promise<void>;
|
|
@@ -19,6 +19,13 @@ declare class HlsVideoElement extends MediaTracksVideoElement {
|
|
|
19
19
|
constructor();
|
|
20
20
|
get config(): HlsVideoConfig | null;
|
|
21
21
|
set config(value: HlsVideoConfig | null);
|
|
22
|
+
/**
|
|
23
|
+
* The actively playing inner <video> element. For HLS, the native
|
|
24
|
+
* element is the playback target (HLS.js attaches MSE to it), so this
|
|
25
|
+
* is always equal to `nativeEl`. Provided to give analytics integrations
|
|
26
|
+
* (e.g. mux-embed) a uniform contract across providers.
|
|
27
|
+
*/
|
|
28
|
+
get activeVideoElement(): HTMLVideoElement | null;
|
|
22
29
|
attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void;
|
|
23
30
|
disconnectedCallback(): void;
|
|
24
31
|
load(): Promise<void>;
|
|
@@ -24,6 +24,13 @@ declare class LiveKitVideoElement extends MediaTracksVideoElement {
|
|
|
24
24
|
}): string;
|
|
25
25
|
room: Room | null;
|
|
26
26
|
constructor();
|
|
27
|
+
/**
|
|
28
|
+
* The actively playing inner <video> element, or null if no track has
|
|
29
|
+
* been subscribed yet. Distinct from `nativeEl`, which is the hidden
|
|
30
|
+
* placeholder from custom-media-element. Analytics integrations
|
|
31
|
+
* (e.g. mux-embed) must monitor this element, not `nativeEl`.
|
|
32
|
+
*/
|
|
33
|
+
get activeVideoElement(): HTMLVideoElement | null;
|
|
27
34
|
get config(): LiveKitVideoConfig | null;
|
|
28
35
|
set config(value: LiveKitVideoConfig | null);
|
|
29
36
|
get url(): string | null;
|
|
@@ -114,6 +114,13 @@ declare class NanoVideoElement extends MediaTracksVideoElement {
|
|
|
114
114
|
}): string;
|
|
115
115
|
api: NanoPlayerInstance | null;
|
|
116
116
|
constructor();
|
|
117
|
+
/**
|
|
118
|
+
* The actively playing inner <video> element, or null if NanoPlayer has
|
|
119
|
+
* not bound one yet. Distinct from `nativeEl`, which is the hidden
|
|
120
|
+
* placeholder from custom-media-element. Analytics integrations
|
|
121
|
+
* (e.g. mux-embed) must monitor this element, not `nativeEl`.
|
|
122
|
+
*/
|
|
123
|
+
get activeVideoElement(): HTMLVideoElement | null;
|
|
117
124
|
get config(): NanoVideoConfig | null;
|
|
118
125
|
set config(value: NanoVideoConfig | null);
|
|
119
126
|
/** Full NanoPlayer source configuration from API */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broadcastingplatforms/player",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Universal video player web component built with Lit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/bp-player.js",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"build:bundle": "node build.mjs",
|
|
29
29
|
"build:prod": "NODE_ENV=production bun run build",
|
|
30
30
|
"dev": "concurrently \"tsc --emitDeclarationOnly --watch --preserveWatchOutput\" \"node build.mjs --watch\"",
|
|
31
|
-
"dev:demo": "vite",
|
|
32
31
|
"clean": "rm -rf dist tsconfig.tsbuildinfo",
|
|
33
32
|
"typecheck": "tsc --noEmit",
|
|
34
33
|
"test": "vitest run",
|