@broadcastingplatforms/player 0.0.0-dev.5a7dff6 → 0.0.0-dev.7888976
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/README.md +157 -0
- package/dist/bp-player.js +126 -126
- package/dist/bp-player.mjs +125 -125
- package/dist/bp-player.standalone.mjs +140 -140
- package/dist/components/bp-default-ui.d.ts +2 -2
- package/dist/components/bp-player.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/providers/contract.d.ts +9 -0
- package/dist/util/attribute.d.ts +0 -2
- package/package.json +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import type { PlayerCore } from '../core/player-core';
|
|
3
|
-
import type { ProviderConfig,
|
|
3
|
+
import type { ProviderConfig, SourceDescription } from '../providers/contract';
|
|
4
4
|
import 'media-chrome';
|
|
5
5
|
import 'media-chrome/menu';
|
|
6
6
|
import './bp-player';
|
|
@@ -24,7 +24,7 @@ export declare class BPDefaultUI extends LitElement {
|
|
|
24
24
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
25
25
|
connectedCallback(): void;
|
|
26
26
|
disconnectedCallback(): void;
|
|
27
|
-
|
|
27
|
+
source?: SourceDescription;
|
|
28
28
|
autoplay: boolean;
|
|
29
29
|
muted: boolean;
|
|
30
30
|
loop: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, type PropertyValues } from 'lit';
|
|
2
2
|
import { type PlayerCore } from '../core/player-core';
|
|
3
3
|
import type { PlayerState } from '../core/state';
|
|
4
|
-
import type { ProviderType, ProviderConfig,
|
|
4
|
+
import type { ProviderType, ProviderConfig, SourceDescription } from '../providers/contract';
|
|
5
5
|
import type { BPLiveService } from '../bplive/service';
|
|
6
6
|
export type BPPlayerReadyEvent = CustomEvent<PlayerCore>;
|
|
7
7
|
declare global {
|
|
@@ -37,7 +37,7 @@ declare class VideoRenditionList extends EventTarget {
|
|
|
37
37
|
export declare class BPPlayer extends LitElement {
|
|
38
38
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
39
39
|
connectedCallback(): void;
|
|
40
|
-
|
|
40
|
+
source?: SourceDescription;
|
|
41
41
|
autoplay: boolean;
|
|
42
42
|
defaultMuted: boolean;
|
|
43
43
|
loop: boolean;
|
|
@@ -98,7 +98,7 @@ export declare class BPPlayer extends LitElement {
|
|
|
98
98
|
private getContainerClasses;
|
|
99
99
|
private getPosterClasses;
|
|
100
100
|
private getContainerStyle;
|
|
101
|
-
private
|
|
101
|
+
private getPoster;
|
|
102
102
|
protected render(): import("lit").TemplateResult<1>;
|
|
103
103
|
}
|
|
104
104
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { createInitialState, classifyNanoPlayerError, NANOPLAYER_NO_REPLAY_CODES
|
|
|
11
11
|
export type { PlayerState, QualityLevel, PresentationMode, ConnectionState, StreamType, ContentType, PlayerError, ErrorCategory, } from './core/state';
|
|
12
12
|
export { StateReceiverMixin, StateReceiverProps, isStateReceiverElement, forEachStateReceiverElement, propagateStateToReceiver, removeStateFromReceiver, } from './core/state-receiver';
|
|
13
13
|
export type { StateReceiverElement, StateReceiverPropertyMap } from './core/state-receiver';
|
|
14
|
-
export type { ProviderType, ProviderConfig, VideoProviderConfig, NanoProviderConfig, LiveKitProviderConfig, PlayerSource, ResolvedPlayerSource, VideoSource, NanoSource, LiveKitSource, PosterSource, PlayerSourceItem, PlayerSources, } from './providers/contract';
|
|
14
|
+
export type { ProviderType, ProviderConfig, VideoProviderConfig, NanoProviderConfig, LiveKitProviderConfig, PlayerSource, ResolvedPlayerSource, VideoSource, NanoSource, LiveKitSource, PosterSource, PlayerSourceItem, PlayerSources, SourceDescription, } from './providers/contract';
|
|
15
15
|
export { BPLiveService, BPLiveError, type BPLiveResolvedResult } from './bplive/service';
|
|
16
16
|
export { isBPLiveSource, isBPLiveStreamSource, isBPLiveClipSource, } from './bplive/types';
|
|
17
17
|
export type { BPLiveConfig, BPLiveSource, BPLiveStreamSource, BPLiveClipSource, BPLiveStream, BPLiveStreamResponse, BPLiveClip, BPLiveClipResponse, BPLiveChannel, BPLiveActiveStream, BPLivePlayerSource, BPLiveLiveKitPlayerSource, BPLiveNanoPlayerSource, BPLiveClipMedia, } from './bplive/types';
|
|
@@ -51,6 +51,15 @@ export type PosterSource = {
|
|
|
51
51
|
};
|
|
52
52
|
export type PlayerSourceItem = PlayerSource | PosterSource;
|
|
53
53
|
export type PlayerSources = PlayerSourceItem[];
|
|
54
|
+
/**
|
|
55
|
+
* Source description containing sources and optional metadata.
|
|
56
|
+
*/
|
|
57
|
+
export interface SourceDescription {
|
|
58
|
+
/** Array of playable sources */
|
|
59
|
+
sources: PlayerSource[];
|
|
60
|
+
/** Poster image URL */
|
|
61
|
+
poster?: string;
|
|
62
|
+
}
|
|
54
63
|
export interface ProviderConfig {
|
|
55
64
|
libraryLocation?: string;
|
|
56
65
|
video?: VideoProviderConfig;
|
package/dist/util/attribute.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broadcastingplatforms/player",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.7888976",
|
|
4
4
|
"description": "Universal video player web component built with Lit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/bp-player.js",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^22.10.2",
|
|
53
|
+
"concurrently": "^9.1.2",
|
|
53
54
|
"esbuild": "^0.24.0",
|
|
54
55
|
"typescript": "^5.7.2",
|
|
55
56
|
"vite": "^6.0.5"
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"build:types": "tsc --emitDeclarationOnly",
|
|
64
65
|
"build:bundle": "node build.mjs",
|
|
65
66
|
"build:prod": "NODE_ENV=production pnpm build",
|
|
66
|
-
"dev": "node build.mjs --watch",
|
|
67
|
+
"dev": "concurrently \"tsc --emitDeclarationOnly --watch --preserveWatchOutput\" \"node build.mjs --watch\"",
|
|
67
68
|
"dev:demo": "vite"
|
|
68
69
|
}
|
|
69
70
|
}
|