@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.
Files changed (42) hide show
  1. package/LICENSE +72 -0
  2. package/README.md +79 -0
  3. package/dist/bp-player.js +201 -188
  4. package/dist/bp-player.mjs +201 -188
  5. package/dist/bp-player.standalone.mjs +255 -242
  6. package/dist/components/bp-default-ui.d.ts +2 -4
  7. package/dist/components/bp-player.d.ts +2 -1
  8. package/dist/core/events.d.ts +148 -0
  9. package/dist/core/player-core.d.ts +3 -2
  10. package/dist/core/state.d.ts +2 -1
  11. package/dist/elements/hls-video.d.ts +1 -0
  12. package/dist/elements/nano-video.d.ts +2 -0
  13. package/dist/events/AddRenditionEvent.d.ts +6 -0
  14. package/dist/events/CanPlayEvent.d.ts +5 -0
  15. package/dist/events/CanPlayThroughEvent.d.ts +5 -0
  16. package/dist/events/ChangeEvent.d.ts +5 -0
  17. package/dist/events/DurationChangeEvent.d.ts +5 -0
  18. package/dist/events/EmptiedEvent.d.ts +5 -0
  19. package/dist/events/EndedEvent.d.ts +5 -0
  20. package/dist/events/ErrorEvent.d.ts +9 -0
  21. package/dist/events/EventUtils.d.ts +22 -0
  22. package/dist/events/LoadStartEvent.d.ts +5 -0
  23. package/dist/events/LoadedDataEvent.d.ts +5 -0
  24. package/dist/events/LoadedMetadataEvent.d.ts +5 -0
  25. package/dist/events/PauseEvent.d.ts +5 -0
  26. package/dist/events/PlayEvent.d.ts +5 -0
  27. package/dist/events/PlayingEvent.d.ts +5 -0
  28. package/dist/events/ProgressEvent.d.ts +5 -0
  29. package/dist/events/RateChangeEvent.d.ts +5 -0
  30. package/dist/events/ReadyEvent.d.ts +6 -0
  31. package/dist/events/ResizeEvent.d.ts +5 -0
  32. package/dist/events/SeekedEvent.d.ts +5 -0
  33. package/dist/events/SeekingEvent.d.ts +5 -0
  34. package/dist/events/TimeUpdateEvent.d.ts +5 -0
  35. package/dist/events/VolumeChangeEvent.d.ts +5 -0
  36. package/dist/events/WaitingEvent.d.ts +5 -0
  37. package/dist/events/index.d.ts +49 -0
  38. package/dist/index.d.ts +1 -1
  39. package/dist/providers/contract.d.ts +2 -0
  40. package/dist/util/converters.d.ts +14 -0
  41. package/dist/util/index.d.ts +1 -0
  42. 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 = CustomEvent<PlayerCore>;
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
- export type BPPlayerReadyEvent = CustomEvent<PlayerCore>;
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
- setFullscreen(fullscreen: boolean): void;
176
+ private _getFullscreenTarget;
177
+ setFullscreen(fullscreen: boolean): Promise<void>;
177
178
  setPresentationMode(mode: PresentationMode): void;
178
179
  destroy(): void;
179
180
  }
@@ -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;
@@ -83,6 +83,8 @@ interface NanoPlayerConfig {
83
83
  };
84
84
  }
85
85
  interface NanoVideoConfig {
86
+ /** Direct URL to the NanoPlayer script. When set, bypasses libraryLocation construction. */
87
+ scriptUrl?: string;
86
88
  reconnect?: {
87
89
  minDelay: number;
88
90
  maxDelay: number;
@@ -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,5 @@
1
+ export declare const CAN_PLAY_EVENT: "canplay";
2
+ export interface CanPlayEvent extends Event {
3
+ type: typeof CAN_PLAY_EVENT;
4
+ }
5
+ //# sourceMappingURL=CanPlayEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const CAN_PLAY_THROUGH_EVENT: "canplaythrough";
2
+ export interface CanPlayThroughEvent extends Event {
3
+ type: typeof CAN_PLAY_THROUGH_EVENT;
4
+ }
5
+ //# sourceMappingURL=CanPlayThroughEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const CHANGE_EVENT: "change";
2
+ export interface ChangeEvent extends Event {
3
+ type: typeof CHANGE_EVENT;
4
+ }
5
+ //# sourceMappingURL=ChangeEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const DURATION_CHANGE_EVENT: "durationchange";
2
+ export interface DurationChangeEvent extends Event {
3
+ type: typeof DURATION_CHANGE_EVENT;
4
+ }
5
+ //# sourceMappingURL=DurationChangeEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const EMPTIED_EVENT: "emptied";
2
+ export interface EmptiedEvent extends Event {
3
+ type: typeof EMPTIED_EVENT;
4
+ }
5
+ //# sourceMappingURL=EmptiedEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const ENDED_EVENT: "ended";
2
+ export interface EndedEvent extends Event {
3
+ type: typeof ENDED_EVENT;
4
+ }
5
+ //# sourceMappingURL=EndedEvent.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,5 @@
1
+ export declare const LOAD_START_EVENT: "loadstart";
2
+ export interface LoadStartEvent extends Event {
3
+ type: typeof LOAD_START_EVENT;
4
+ }
5
+ //# sourceMappingURL=LoadStartEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const LOADED_DATA_EVENT: "loadeddata";
2
+ export interface LoadedDataEvent extends Event {
3
+ type: typeof LOADED_DATA_EVENT;
4
+ }
5
+ //# sourceMappingURL=LoadedDataEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const LOADED_METADATA_EVENT: "loadedmetadata";
2
+ export interface LoadedMetadataEvent extends Event {
3
+ type: typeof LOADED_METADATA_EVENT;
4
+ }
5
+ //# sourceMappingURL=LoadedMetadataEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const PAUSE_EVENT: "pause";
2
+ export interface PauseEvent extends Event {
3
+ type: typeof PAUSE_EVENT;
4
+ }
5
+ //# sourceMappingURL=PauseEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const PLAY_EVENT: "play";
2
+ export interface PlayEvent extends Event {
3
+ type: typeof PLAY_EVENT;
4
+ }
5
+ //# sourceMappingURL=PlayEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const PLAYING_EVENT: "playing";
2
+ export interface PlayingEvent extends Event {
3
+ type: typeof PLAYING_EVENT;
4
+ }
5
+ //# sourceMappingURL=PlayingEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const PROGRESS_EVENT: "progress";
2
+ export interface ProgressEvent extends Event {
3
+ type: typeof PROGRESS_EVENT;
4
+ }
5
+ //# sourceMappingURL=ProgressEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const RATE_CHANGE_EVENT: "ratechange";
2
+ export interface RateChangeEvent extends Event {
3
+ type: typeof RATE_CHANGE_EVENT;
4
+ }
5
+ //# sourceMappingURL=RateChangeEvent.d.ts.map
@@ -0,0 +1,6 @@
1
+ import type { PlayerCore } from '../core/player-core';
2
+ export declare const READY_EVENT: "ready";
3
+ export interface ReadyEvent extends CustomEvent<PlayerCore> {
4
+ type: typeof READY_EVENT;
5
+ }
6
+ //# sourceMappingURL=ReadyEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const RESIZE_EVENT: "resize";
2
+ export interface ResizeEvent extends Event {
3
+ type: typeof RESIZE_EVENT;
4
+ }
5
+ //# sourceMappingURL=ResizeEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const SEEKED_EVENT: "seeked";
2
+ export interface SeekedEvent extends Event {
3
+ type: typeof SEEKED_EVENT;
4
+ }
5
+ //# sourceMappingURL=SeekedEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const SEEKING_EVENT: "seeking";
2
+ export interface SeekingEvent extends Event {
3
+ type: typeof SEEKING_EVENT;
4
+ }
5
+ //# sourceMappingURL=SeekingEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const TIME_UPDATE_EVENT: "timeupdate";
2
+ export interface TimeUpdateEvent extends Event {
3
+ type: typeof TIME_UPDATE_EVENT;
4
+ }
5
+ //# sourceMappingURL=TimeUpdateEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const VOLUME_CHANGE_EVENT: "volumechange";
2
+ export interface VolumeChangeEvent extends Event {
3
+ type: typeof VOLUME_CHANGE_EVENT;
4
+ }
5
+ //# sourceMappingURL=VolumeChangeEvent.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare const WAITING_EVENT: "waiting";
2
+ export interface WaitingEvent extends Event {
3
+ type: typeof WAITING_EVENT;
4
+ }
5
+ //# sourceMappingURL=WaitingEvent.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, PlayerCoreImpl } from './core/player-core';
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
@@ -1,2 +1,3 @@
1
1
  export * from './attribute';
2
+ export * from './converters';
2
3
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@broadcastingplatforms/player",
3
- "version": "0.0.0-dev.c57124a",
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": "UNLICENSED",
41
+ "license": "SEE LICENSE IN LICENSE",
60
42
  "publishConfig": {
61
43
  "access": "public"
62
44
  },