@broadcastingplatforms/player 0.0.0-dev.9e24892 → 0.0.0-dev.e67afbe
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 +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/player-core.d.ts +3 -2
- 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/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 +1 -17
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -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
|
|
@@ -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": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.e67afbe",
|
|
4
4
|
"description": "Universal video player web component built with Lit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/bp-player.js",
|
|
@@ -16,22 +16,6 @@
|
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"import": "./dist/bp-player.standalone.mjs"
|
|
18
18
|
},
|
|
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
19
|
"./dist/*": "./dist/*",
|
|
36
20
|
"./package.json": "./package.json"
|
|
37
21
|
},
|