@broadcastingplatforms/player 0.0.0-dev.c57124a → 1.1.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/LICENSE +72 -0
- package/README.md +79 -0
- package/dist/bp-player.js +201 -188
- package/dist/bp-player.mjs +201 -188
- package/dist/bp-player.standalone.mjs +255 -242
- package/dist/components/bp-default-ui.d.ts +2 -4
- package/dist/components/bp-player.d.ts +2 -1
- package/dist/core/events.d.ts +148 -0
- package/dist/core/player-core.d.ts +3 -2
- package/dist/core/state.d.ts +2 -1
- package/dist/elements/hls-video.d.ts +1 -0
- package/dist/elements/nano-video.d.ts +2 -0
- package/dist/events/AddRenditionEvent.d.ts +6 -0
- package/dist/events/CanPlayEvent.d.ts +5 -0
- package/dist/events/CanPlayThroughEvent.d.ts +5 -0
- package/dist/events/ChangeEvent.d.ts +5 -0
- package/dist/events/DurationChangeEvent.d.ts +5 -0
- package/dist/events/EmptiedEvent.d.ts +5 -0
- package/dist/events/EndedEvent.d.ts +5 -0
- package/dist/events/ErrorEvent.d.ts +9 -0
- package/dist/events/EventUtils.d.ts +22 -0
- package/dist/events/LoadStartEvent.d.ts +5 -0
- package/dist/events/LoadedDataEvent.d.ts +5 -0
- package/dist/events/LoadedMetadataEvent.d.ts +5 -0
- package/dist/events/PauseEvent.d.ts +5 -0
- package/dist/events/PlayEvent.d.ts +5 -0
- package/dist/events/PlayingEvent.d.ts +5 -0
- package/dist/events/ProgressEvent.d.ts +5 -0
- package/dist/events/RateChangeEvent.d.ts +5 -0
- package/dist/events/ReadyEvent.d.ts +6 -0
- package/dist/events/ResizeEvent.d.ts +5 -0
- package/dist/events/SeekedEvent.d.ts +5 -0
- package/dist/events/SeekingEvent.d.ts +5 -0
- package/dist/events/TimeUpdateEvent.d.ts +5 -0
- package/dist/events/VolumeChangeEvent.d.ts +5 -0
- package/dist/events/WaitingEvent.d.ts +5 -0
- package/dist/events/index.d.ts +49 -0
- package/dist/index.d.ts +1 -1
- package/dist/providers/contract.d.ts +2 -0
- package/dist/util/converters.d.ts +14 -0
- package/dist/util/index.d.ts +1 -0
- package/package.json +4 -22
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import type { PlayerCore } from '../core/player-core';
|
|
3
3
|
import type { ProviderConfig, SourceDescription } from '../providers/contract';
|
|
4
|
+
import { type ReadyEvent } from '../events';
|
|
4
5
|
import 'media-chrome';
|
|
5
6
|
import 'media-chrome/menu';
|
|
6
7
|
import './bp-player';
|
|
7
8
|
import './bp-error-display';
|
|
8
9
|
import type { BPLiveService } from '../bplive/service';
|
|
9
|
-
export type BPDefaultUIReadyEvent =
|
|
10
|
+
export type BPDefaultUIReadyEvent = ReadyEvent;
|
|
10
11
|
declare global {
|
|
11
12
|
interface HTMLElementTagNameMap {
|
|
12
13
|
'bp-default-ui': BPDefaultUI;
|
|
13
14
|
}
|
|
14
|
-
interface HTMLElementEventMap {
|
|
15
|
-
ready: BPDefaultUIReadyEvent;
|
|
16
|
-
}
|
|
17
15
|
}
|
|
18
16
|
/**
|
|
19
17
|
* Complete player UI with controls, loading states, and error handling.
|
|
@@ -4,7 +4,8 @@ import type { PlayerState } from '../core/state';
|
|
|
4
4
|
import type { ProviderType, ProviderConfig, SourceDescription } from '../providers/contract';
|
|
5
5
|
import type { BPLiveService } from '../bplive/service';
|
|
6
6
|
import { VideoRenditionList } from './video-rendition-list';
|
|
7
|
-
|
|
7
|
+
import type { ReadyEvent } from '../events';
|
|
8
|
+
export type BPPlayerReadyEvent = ReadyEvent;
|
|
8
9
|
declare global {
|
|
9
10
|
interface HTMLElementTagNameMap {
|
|
10
11
|
'bp-player': BPPlayer;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Player event system with typed events.
|
|
3
|
+
* Inspired by THEOplayer's event architecture.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Base player event interface.
|
|
7
|
+
*/
|
|
8
|
+
export interface PlayerEvent<TType extends string = string> {
|
|
9
|
+
/** The type of the event. */
|
|
10
|
+
readonly type: TType;
|
|
11
|
+
/** The creation date of the event. */
|
|
12
|
+
readonly date: Date;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Player event types as const for type safety.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PlayerEventType: {
|
|
18
|
+
readonly PLAY: "play";
|
|
19
|
+
readonly PAUSE: "pause";
|
|
20
|
+
readonly PLAYING: "playing";
|
|
21
|
+
readonly WAITING: "waiting";
|
|
22
|
+
readonly ENDED: "ended";
|
|
23
|
+
readonly SEEKING: "seeking";
|
|
24
|
+
readonly SEEKED: "seeked";
|
|
25
|
+
readonly TIME_UPDATE: "timeupdate";
|
|
26
|
+
readonly DURATION_CHANGE: "durationchange";
|
|
27
|
+
readonly LOAD_START: "loadstart";
|
|
28
|
+
readonly LOADED_METADATA: "loadedmetadata";
|
|
29
|
+
readonly LOADED_DATA: "loadeddata";
|
|
30
|
+
readonly CAN_PLAY: "canplay";
|
|
31
|
+
readonly CAN_PLAY_THROUGH: "canplaythrough";
|
|
32
|
+
readonly PROGRESS: "progress";
|
|
33
|
+
readonly EMPTIED: "emptied";
|
|
34
|
+
readonly VOLUME_CHANGE: "volumechange";
|
|
35
|
+
readonly RATE_CHANGE: "ratechange";
|
|
36
|
+
readonly RESIZE: "resize";
|
|
37
|
+
readonly QUALITIES_CHANGE: "qualitieschange";
|
|
38
|
+
readonly QUALITY_CHANGE: "qualitychange";
|
|
39
|
+
readonly TARGET_QUALITY_CHANGED: "targetqualitychanged";
|
|
40
|
+
readonly STATE_CHANGE: "statechange";
|
|
41
|
+
readonly READY: "ready";
|
|
42
|
+
readonly ERROR: "error";
|
|
43
|
+
readonly DESTROY: "destroy";
|
|
44
|
+
};
|
|
45
|
+
export type PlayerEventTypes = typeof PlayerEventType[keyof typeof PlayerEventType];
|
|
46
|
+
export interface PlayEvent extends PlayerEvent<'play'> {
|
|
47
|
+
}
|
|
48
|
+
export interface PauseEvent extends PlayerEvent<'pause'> {
|
|
49
|
+
}
|
|
50
|
+
export interface PlayingEvent extends PlayerEvent<'playing'> {
|
|
51
|
+
}
|
|
52
|
+
export interface WaitingEvent extends PlayerEvent<'waiting'> {
|
|
53
|
+
}
|
|
54
|
+
export interface EndedEvent extends PlayerEvent<'ended'> {
|
|
55
|
+
}
|
|
56
|
+
export interface SeekingEvent extends PlayerEvent<'seeking'> {
|
|
57
|
+
}
|
|
58
|
+
export interface SeekedEvent extends PlayerEvent<'seeked'> {
|
|
59
|
+
}
|
|
60
|
+
export interface TimeUpdateEvent extends PlayerEvent<'timeupdate'> {
|
|
61
|
+
readonly currentTime: number;
|
|
62
|
+
}
|
|
63
|
+
export interface DurationChangeEvent extends PlayerEvent<'durationchange'> {
|
|
64
|
+
readonly duration: number;
|
|
65
|
+
}
|
|
66
|
+
export interface LoadStartEvent extends PlayerEvent<'loadstart'> {
|
|
67
|
+
}
|
|
68
|
+
export interface LoadedMetadataEvent extends PlayerEvent<'loadedmetadata'> {
|
|
69
|
+
}
|
|
70
|
+
export interface LoadedDataEvent extends PlayerEvent<'loadeddata'> {
|
|
71
|
+
}
|
|
72
|
+
export interface CanPlayEvent extends PlayerEvent<'canplay'> {
|
|
73
|
+
}
|
|
74
|
+
export interface CanPlayThroughEvent extends PlayerEvent<'canplaythrough'> {
|
|
75
|
+
}
|
|
76
|
+
export interface ProgressEvent extends PlayerEvent<'progress'> {
|
|
77
|
+
}
|
|
78
|
+
export interface EmptiedEvent extends PlayerEvent<'emptied'> {
|
|
79
|
+
}
|
|
80
|
+
export interface VolumeChangeEvent extends PlayerEvent<'volumechange'> {
|
|
81
|
+
readonly volume: number;
|
|
82
|
+
readonly muted: boolean;
|
|
83
|
+
}
|
|
84
|
+
export interface RateChangeEvent extends PlayerEvent<'ratechange'> {
|
|
85
|
+
readonly playbackRate: number;
|
|
86
|
+
}
|
|
87
|
+
export interface ResizeEvent extends PlayerEvent<'resize'> {
|
|
88
|
+
readonly videoWidth: number;
|
|
89
|
+
readonly videoHeight: number;
|
|
90
|
+
}
|
|
91
|
+
export interface StateChangeEvent extends PlayerEvent<'statechange'> {
|
|
92
|
+
}
|
|
93
|
+
export interface ReadyEvent extends PlayerEvent<'ready'> {
|
|
94
|
+
}
|
|
95
|
+
export interface DestroyEvent extends PlayerEvent<'destroy'> {
|
|
96
|
+
}
|
|
97
|
+
export interface PlayerErrorEvent extends PlayerEvent<'error'> {
|
|
98
|
+
readonly error: Error;
|
|
99
|
+
readonly code?: number;
|
|
100
|
+
readonly message: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Maps player event types to their event interfaces.
|
|
104
|
+
*/
|
|
105
|
+
export interface PlayerEventMap {
|
|
106
|
+
play: PlayEvent;
|
|
107
|
+
pause: PauseEvent;
|
|
108
|
+
playing: PlayingEvent;
|
|
109
|
+
waiting: WaitingEvent;
|
|
110
|
+
ended: EndedEvent;
|
|
111
|
+
seeking: SeekingEvent;
|
|
112
|
+
seeked: SeekedEvent;
|
|
113
|
+
timeupdate: TimeUpdateEvent;
|
|
114
|
+
durationchange: DurationChangeEvent;
|
|
115
|
+
loadstart: LoadStartEvent;
|
|
116
|
+
loadedmetadata: LoadedMetadataEvent;
|
|
117
|
+
loadeddata: LoadedDataEvent;
|
|
118
|
+
canplay: CanPlayEvent;
|
|
119
|
+
canplaythrough: CanPlayThroughEvent;
|
|
120
|
+
progress: ProgressEvent;
|
|
121
|
+
emptied: EmptiedEvent;
|
|
122
|
+
volumechange: VolumeChangeEvent;
|
|
123
|
+
ratechange: RateChangeEvent;
|
|
124
|
+
resize: ResizeEvent;
|
|
125
|
+
statechange: StateChangeEvent;
|
|
126
|
+
ready: ReadyEvent;
|
|
127
|
+
error: PlayerErrorEvent;
|
|
128
|
+
destroy: DestroyEvent;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Creates a player event with the given type and optional data.
|
|
132
|
+
*/
|
|
133
|
+
export declare function createPlayerEvent<TType extends keyof PlayerEventMap>(type: TType, data?: Omit<PlayerEventMap[TType], 'type' | 'date'>): PlayerEventMap[TType];
|
|
134
|
+
/**
|
|
135
|
+
* Creates a DOM CustomEvent that wraps a PlayerEvent.
|
|
136
|
+
* Use this when dispatching events through DOM elements.
|
|
137
|
+
*/
|
|
138
|
+
export declare function createCustomEvent<TType extends keyof PlayerEventMap>(type: TType, data?: Omit<PlayerEventMap[TType], 'type' | 'date'>): CustomEvent<PlayerEventMap[TType]>;
|
|
139
|
+
/**
|
|
140
|
+
* Creates a standard DOM Event with bubbles and composed.
|
|
141
|
+
* Use this for simple events that don't need extra data.
|
|
142
|
+
*/
|
|
143
|
+
export declare function createEvent(type: string): Event;
|
|
144
|
+
/**
|
|
145
|
+
* Creates a DOM ErrorEvent with proper structure.
|
|
146
|
+
*/
|
|
147
|
+
export declare function createErrorEvent(error: Error, code?: number): ErrorEvent;
|
|
148
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -126,7 +126,7 @@ export interface PlayerCore {
|
|
|
126
126
|
setPlaybackRate(rate: number): void;
|
|
127
127
|
setTargetQuality(quality: QualityLevel | null): void;
|
|
128
128
|
setQuality(quality: QualityLevel | null): void;
|
|
129
|
-
setFullscreen(fullscreen: boolean): void
|
|
129
|
+
setFullscreen(fullscreen: boolean): Promise<void>;
|
|
130
130
|
setPresentationMode(mode: PresentationMode): void;
|
|
131
131
|
destroy(): void;
|
|
132
132
|
}
|
|
@@ -173,7 +173,8 @@ export declare class PlayerCoreImpl implements PlayerCore {
|
|
|
173
173
|
setPlaybackRate(rate: number): void;
|
|
174
174
|
setTargetQuality(quality: QualityLevel | null): void;
|
|
175
175
|
setQuality(quality: QualityLevel | null): void;
|
|
176
|
-
|
|
176
|
+
private _getFullscreenTarget;
|
|
177
|
+
setFullscreen(fullscreen: boolean): Promise<void>;
|
|
177
178
|
setPresentationMode(mode: PresentationMode): void;
|
|
178
179
|
destroy(): void;
|
|
179
180
|
}
|
package/dist/core/state.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ProviderType } from '../providers/contract';
|
|
2
|
+
export type { ProviderType };
|
|
1
3
|
export interface PlayerState {
|
|
2
4
|
readonly paused: boolean;
|
|
3
5
|
readonly playing: boolean;
|
|
@@ -36,7 +38,6 @@ export interface QualityLevel {
|
|
|
36
38
|
export type PresentationMode = 'inline' | 'fullscreen' | 'pip';
|
|
37
39
|
export type ConnectionState = 'idle' | 'connecting' | 'connected' | 'reconnecting' | 'disconnected' | 'failed';
|
|
38
40
|
export type StreamType = 'vod' | 'live' | 'dvr';
|
|
39
|
-
export type ProviderType = 'video' | 'nano' | 'livekit';
|
|
40
41
|
export type ContentType = 'clip' | 'stream' | 'video';
|
|
41
42
|
export type ErrorCategory = 'offline' | 'network' | 'security' | 'media' | 'autoplay' | 'setup' | 'unknown';
|
|
42
43
|
export interface PlayerError {
|
|
@@ -20,6 +20,7 @@ declare class HlsVideoElement extends MediaTracksVideoElement {
|
|
|
20
20
|
get config(): HlsVideoConfig | null;
|
|
21
21
|
set config(value: HlsVideoConfig | null);
|
|
22
22
|
attributeChangedCallback(attrName: string, oldValue: string | null, newValue: string | null): void;
|
|
23
|
+
disconnectedCallback(): void;
|
|
23
24
|
load(): Promise<void>;
|
|
24
25
|
}
|
|
25
26
|
export default HlsVideoElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VideoRendition } from '../components/video-rendition-list';
|
|
2
|
+
export declare const ADD_RENDITION_EVENT: "addrendition";
|
|
3
|
+
export interface AddRenditionEvent extends CustomEvent<VideoRendition> {
|
|
4
|
+
type: typeof ADD_RENDITION_EVENT;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=AddRenditionEvent.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ERROR_EVENT: "error";
|
|
2
|
+
export interface ErrorEventDetail {
|
|
3
|
+
error: Error;
|
|
4
|
+
code?: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PlayerErrorEvent extends CustomEvent<ErrorEventDetail> {
|
|
7
|
+
type: typeof ERROR_EVENT;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ErrorEvent.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-browser event factory utilities.
|
|
3
|
+
*/
|
|
4
|
+
export type EventFactory = <TType extends string = string>(type: TType, eventInitDict?: EventInit) => Event & {
|
|
5
|
+
readonly type: TType;
|
|
6
|
+
};
|
|
7
|
+
export type CustomEventFactory = <TType extends string = string, TDetail = unknown>(type: TType, eventInitDict?: CustomEventInit<TDetail>) => CustomEvent<TDetail> & {
|
|
8
|
+
readonly type: TType;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Creates a DOM Event with bubbles and composed enabled by default.
|
|
12
|
+
*/
|
|
13
|
+
export declare const createEvent: EventFactory;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a DOM CustomEvent with bubbles and composed enabled by default.
|
|
16
|
+
*/
|
|
17
|
+
export declare const createCustomEvent: CustomEventFactory;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a DOM ErrorEvent with bubbles and composed enabled by default.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createErrorEvent(error: Error, code?: number): ErrorEvent;
|
|
22
|
+
//# sourceMappingURL=EventUtils.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export { createEvent, createCustomEvent, createErrorEvent } from './EventUtils';
|
|
2
|
+
export type { EventFactory, CustomEventFactory } from './EventUtils';
|
|
3
|
+
export { PLAY_EVENT } from './PlayEvent';
|
|
4
|
+
export type { PlayEvent } from './PlayEvent';
|
|
5
|
+
export { PAUSE_EVENT } from './PauseEvent';
|
|
6
|
+
export type { PauseEvent } from './PauseEvent';
|
|
7
|
+
export { PLAYING_EVENT } from './PlayingEvent';
|
|
8
|
+
export type { PlayingEvent } from './PlayingEvent';
|
|
9
|
+
export { WAITING_EVENT } from './WaitingEvent';
|
|
10
|
+
export type { WaitingEvent } from './WaitingEvent';
|
|
11
|
+
export { ENDED_EVENT } from './EndedEvent';
|
|
12
|
+
export type { EndedEvent } from './EndedEvent';
|
|
13
|
+
export { SEEKING_EVENT } from './SeekingEvent';
|
|
14
|
+
export type { SeekingEvent } from './SeekingEvent';
|
|
15
|
+
export { SEEKED_EVENT } from './SeekedEvent';
|
|
16
|
+
export type { SeekedEvent } from './SeekedEvent';
|
|
17
|
+
export { TIME_UPDATE_EVENT } from './TimeUpdateEvent';
|
|
18
|
+
export type { TimeUpdateEvent } from './TimeUpdateEvent';
|
|
19
|
+
export { DURATION_CHANGE_EVENT } from './DurationChangeEvent';
|
|
20
|
+
export type { DurationChangeEvent } from './DurationChangeEvent';
|
|
21
|
+
export { LOAD_START_EVENT } from './LoadStartEvent';
|
|
22
|
+
export type { LoadStartEvent } from './LoadStartEvent';
|
|
23
|
+
export { LOADED_METADATA_EVENT } from './LoadedMetadataEvent';
|
|
24
|
+
export type { LoadedMetadataEvent } from './LoadedMetadataEvent';
|
|
25
|
+
export { LOADED_DATA_EVENT } from './LoadedDataEvent';
|
|
26
|
+
export type { LoadedDataEvent } from './LoadedDataEvent';
|
|
27
|
+
export { CAN_PLAY_EVENT } from './CanPlayEvent';
|
|
28
|
+
export type { CanPlayEvent } from './CanPlayEvent';
|
|
29
|
+
export { CAN_PLAY_THROUGH_EVENT } from './CanPlayThroughEvent';
|
|
30
|
+
export type { CanPlayThroughEvent } from './CanPlayThroughEvent';
|
|
31
|
+
export { PROGRESS_EVENT } from './ProgressEvent';
|
|
32
|
+
export type { ProgressEvent } from './ProgressEvent';
|
|
33
|
+
export { EMPTIED_EVENT } from './EmptiedEvent';
|
|
34
|
+
export type { EmptiedEvent } from './EmptiedEvent';
|
|
35
|
+
export { VOLUME_CHANGE_EVENT } from './VolumeChangeEvent';
|
|
36
|
+
export type { VolumeChangeEvent } from './VolumeChangeEvent';
|
|
37
|
+
export { RATE_CHANGE_EVENT } from './RateChangeEvent';
|
|
38
|
+
export type { RateChangeEvent } from './RateChangeEvent';
|
|
39
|
+
export { RESIZE_EVENT } from './ResizeEvent';
|
|
40
|
+
export type { ResizeEvent } from './ResizeEvent';
|
|
41
|
+
export { ERROR_EVENT } from './ErrorEvent';
|
|
42
|
+
export type { PlayerErrorEvent, ErrorEventDetail } from './ErrorEvent';
|
|
43
|
+
export { READY_EVENT } from './ReadyEvent';
|
|
44
|
+
export type { ReadyEvent } from './ReadyEvent';
|
|
45
|
+
export { CHANGE_EVENT } from './ChangeEvent';
|
|
46
|
+
export type { ChangeEvent } from './ChangeEvent';
|
|
47
|
+
export { ADD_RENDITION_EVENT } from './AddRenditionEvent';
|
|
48
|
+
export type { AddRenditionEvent } from './AddRenditionEvent';
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { BPOverlay, type OverlayType } from './components/bp-overlay';
|
|
|
5
5
|
export { addGlobalStyles, createTemplate, templateWithStyles } from './styles/index';
|
|
6
6
|
export { Attribute, toggleAttribute } from './util/attribute';
|
|
7
7
|
export { HlsVideoElement, HlsVideo, Hls, NanoVideoElement, NanoVideo, LiveKitVideoElement, LiveKitVideo, } from './elements/index';
|
|
8
|
-
export { createPlayerCore
|
|
8
|
+
export { createPlayerCore } from './core/player-core';
|
|
9
9
|
export type { PlayerCore, PlayerCoreEventMap, PlayerCoreEventType, CustomVideoElement } from './core/player-core';
|
|
10
10
|
export { createInitialState, classifyNanoPlayerError, classifyLiveKitError, NANOPLAYER_NO_REPLAY_CODES } from './core/state';
|
|
11
11
|
export type { PlayerState, QualityLevel, PresentationMode, ConnectionState, StreamType, ContentType, PlayerError, ErrorCategory, } from './core/state';
|
|
@@ -81,6 +81,8 @@ export interface VideoProviderConfig {
|
|
|
81
81
|
capLevelToPlayerSize?: boolean;
|
|
82
82
|
}
|
|
83
83
|
export interface NanoProviderConfig {
|
|
84
|
+
/** Direct URL to the NanoPlayer script. When set, bypasses libraryLocation construction. */
|
|
85
|
+
scriptUrl?: string;
|
|
84
86
|
reconnect?: {
|
|
85
87
|
minDelay: number;
|
|
86
88
|
maxDelay: number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComplexAttributeConverter } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a JSON converter for Lit complex attributes.
|
|
4
|
+
* Allows setting complex objects (source, config) as JSON strings in HTML attributes.
|
|
5
|
+
*
|
|
6
|
+
* @returns A ComplexAttributeConverter for use with Lit @property decorator
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* @property({ converter: jsonConverter() }) config?: Config;
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare function jsonConverter<T = unknown>(): ComplexAttributeConverter<T | undefined>;
|
|
14
|
+
//# sourceMappingURL=converters.d.ts.map
|
package/dist/util/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broadcastingplatforms/player",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Universal video player web component built with Lit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/bp-player.js",
|
|
@@ -9,29 +9,12 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/bp-player.mjs"
|
|
13
|
-
"require": "./dist/bp-player.js"
|
|
12
|
+
"import": "./dist/bp-player.mjs"
|
|
14
13
|
},
|
|
15
14
|
"./standalone": {
|
|
16
15
|
"types": "./dist/index.d.ts",
|
|
17
16
|
"import": "./dist/bp-player.standalone.mjs"
|
|
18
17
|
},
|
|
19
|
-
"./elements": {
|
|
20
|
-
"types": "./dist/elements/index.d.ts",
|
|
21
|
-
"import": "./dist/elements/index.js"
|
|
22
|
-
},
|
|
23
|
-
"./elements/hls-video": {
|
|
24
|
-
"types": "./dist/elements/hls-video.d.ts",
|
|
25
|
-
"import": "./dist/elements/hls-video.js"
|
|
26
|
-
},
|
|
27
|
-
"./elements/nano-video": {
|
|
28
|
-
"types": "./dist/elements/nano-video.d.ts",
|
|
29
|
-
"import": "./dist/elements/nano-video.js"
|
|
30
|
-
},
|
|
31
|
-
"./elements/livekit-video": {
|
|
32
|
-
"types": "./dist/elements/livekit-video.d.ts",
|
|
33
|
-
"import": "./dist/elements/livekit-video.js"
|
|
34
|
-
},
|
|
35
18
|
"./dist/*": "./dist/*",
|
|
36
19
|
"./package.json": "./package.json"
|
|
37
20
|
},
|
|
@@ -53,10 +36,9 @@
|
|
|
53
36
|
"concurrently": "^9.1.2",
|
|
54
37
|
"esbuild": "^0.24.0",
|
|
55
38
|
"typescript": "^5.7.2",
|
|
56
|
-
"vite": "^6.0.5"
|
|
57
|
-
"@broadcastingplatforms/web-connectors": "0.0.0-dev.c57124a"
|
|
39
|
+
"vite": "^6.0.5"
|
|
58
40
|
},
|
|
59
|
-
"license": "
|
|
41
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
60
42
|
"publishConfig": {
|
|
61
43
|
"access": "public"
|
|
62
44
|
},
|