@helios-project/player 0.48.3
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 +148 -0
- package/dist/bridge.d.ts +2 -0
- package/dist/bridge.js +169 -0
- package/dist/controllers.d.ts +91 -0
- package/dist/controllers.js +224 -0
- package/dist/features/audio-utils.d.ts +10 -0
- package/dist/features/audio-utils.js +66 -0
- package/dist/features/dom-capture.d.ts +1 -0
- package/dist/features/dom-capture.js +253 -0
- package/dist/features/exporter.d.ts +18 -0
- package/dist/features/exporter.js +228 -0
- package/dist/features/srt-parser.d.ts +7 -0
- package/dist/features/srt-parser.js +75 -0
- package/dist/features/text-tracks.d.ts +40 -0
- package/dist/features/text-tracks.js +99 -0
- package/dist/helios-player.bundle.mjs +7775 -0
- package/dist/helios-player.global.js +633 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +1679 -0
- package/package.json +57 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { HeliosSchema } from "@helios-project/core";
|
|
2
|
+
import type { HeliosController } from "./controllers";
|
|
3
|
+
import { ClientSideExporter } from "./features/exporter";
|
|
4
|
+
import { HeliosTextTrack, HeliosTextTrackList, TrackHost } from "./features/text-tracks";
|
|
5
|
+
export { ClientSideExporter };
|
|
6
|
+
export type { HeliosController };
|
|
7
|
+
interface MediaError {
|
|
8
|
+
readonly code: number;
|
|
9
|
+
readonly message: string;
|
|
10
|
+
readonly MEDIA_ERR_ABORTED: number;
|
|
11
|
+
readonly MEDIA_ERR_NETWORK: number;
|
|
12
|
+
readonly MEDIA_ERR_DECODE: number;
|
|
13
|
+
readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class HeliosPlayer extends HTMLElement implements TrackHost {
|
|
16
|
+
private iframe;
|
|
17
|
+
private _textTracks;
|
|
18
|
+
private _domTracks;
|
|
19
|
+
private playPauseBtn;
|
|
20
|
+
private volumeBtn;
|
|
21
|
+
private volumeSlider;
|
|
22
|
+
private scrubber;
|
|
23
|
+
private scrubberWrapper;
|
|
24
|
+
private scrubberTooltip;
|
|
25
|
+
private markersContainer;
|
|
26
|
+
private timeDisplay;
|
|
27
|
+
private exportBtn;
|
|
28
|
+
private overlay;
|
|
29
|
+
private statusText;
|
|
30
|
+
private retryBtn;
|
|
31
|
+
private retryAction;
|
|
32
|
+
private speedSelector;
|
|
33
|
+
private fullscreenBtn;
|
|
34
|
+
private captionsContainer;
|
|
35
|
+
private ccBtn;
|
|
36
|
+
private showCaptions;
|
|
37
|
+
private clickLayer;
|
|
38
|
+
private posterContainer;
|
|
39
|
+
private posterImage;
|
|
40
|
+
private bigPlayBtn;
|
|
41
|
+
private pendingSrc;
|
|
42
|
+
private isLoaded;
|
|
43
|
+
private resizeObserver;
|
|
44
|
+
private controller;
|
|
45
|
+
private directHelios;
|
|
46
|
+
private unsubscribe;
|
|
47
|
+
private connectionInterval;
|
|
48
|
+
private abortController;
|
|
49
|
+
private isExporting;
|
|
50
|
+
private isScrubbing;
|
|
51
|
+
private wasPlayingBeforeScrub;
|
|
52
|
+
private lastState;
|
|
53
|
+
private pendingProps;
|
|
54
|
+
private _error;
|
|
55
|
+
static readonly HAVE_NOTHING = 0;
|
|
56
|
+
static readonly HAVE_METADATA = 1;
|
|
57
|
+
static readonly HAVE_CURRENT_DATA = 2;
|
|
58
|
+
static readonly HAVE_FUTURE_DATA = 3;
|
|
59
|
+
static readonly HAVE_ENOUGH_DATA = 4;
|
|
60
|
+
static readonly NETWORK_EMPTY = 0;
|
|
61
|
+
static readonly NETWORK_IDLE = 1;
|
|
62
|
+
static readonly NETWORK_LOADING = 2;
|
|
63
|
+
static readonly NETWORK_NO_SOURCE = 3;
|
|
64
|
+
private _readyState;
|
|
65
|
+
private _networkState;
|
|
66
|
+
get readyState(): number;
|
|
67
|
+
get networkState(): number;
|
|
68
|
+
get error(): MediaError | null;
|
|
69
|
+
get currentSrc(): string;
|
|
70
|
+
canPlayType(type: string): CanPlayTypeResult;
|
|
71
|
+
get defaultMuted(): boolean;
|
|
72
|
+
set defaultMuted(val: boolean);
|
|
73
|
+
private _defaultPlaybackRate;
|
|
74
|
+
get defaultPlaybackRate(): number;
|
|
75
|
+
set defaultPlaybackRate(val: number);
|
|
76
|
+
private _preservesPitch;
|
|
77
|
+
get preservesPitch(): boolean;
|
|
78
|
+
set preservesPitch(val: boolean);
|
|
79
|
+
get srcObject(): MediaProvider | null;
|
|
80
|
+
set srcObject(val: MediaProvider | null);
|
|
81
|
+
get crossOrigin(): string | null;
|
|
82
|
+
set crossOrigin(val: string | null);
|
|
83
|
+
get seeking(): boolean;
|
|
84
|
+
get buffered(): TimeRanges;
|
|
85
|
+
get seekable(): TimeRanges;
|
|
86
|
+
get played(): TimeRanges;
|
|
87
|
+
get videoWidth(): number;
|
|
88
|
+
get videoHeight(): number;
|
|
89
|
+
get currentTime(): number;
|
|
90
|
+
set currentTime(val: number);
|
|
91
|
+
get currentFrame(): number;
|
|
92
|
+
set currentFrame(val: number);
|
|
93
|
+
get duration(): number;
|
|
94
|
+
get paused(): boolean;
|
|
95
|
+
get ended(): boolean;
|
|
96
|
+
get volume(): number;
|
|
97
|
+
set volume(val: number);
|
|
98
|
+
get muted(): boolean;
|
|
99
|
+
set muted(val: boolean);
|
|
100
|
+
get interactive(): boolean;
|
|
101
|
+
set interactive(val: boolean);
|
|
102
|
+
get playbackRate(): number;
|
|
103
|
+
set playbackRate(val: number);
|
|
104
|
+
get fps(): number;
|
|
105
|
+
get src(): string;
|
|
106
|
+
set src(val: string);
|
|
107
|
+
get autoplay(): boolean;
|
|
108
|
+
set autoplay(val: boolean);
|
|
109
|
+
get loop(): boolean;
|
|
110
|
+
set loop(val: boolean);
|
|
111
|
+
get controls(): boolean;
|
|
112
|
+
set controls(val: boolean);
|
|
113
|
+
get poster(): string;
|
|
114
|
+
set poster(val: string);
|
|
115
|
+
get preload(): string;
|
|
116
|
+
set preload(val: string);
|
|
117
|
+
get sandbox(): string;
|
|
118
|
+
set sandbox(val: string);
|
|
119
|
+
play(): Promise<void>;
|
|
120
|
+
load(): void;
|
|
121
|
+
pause(): void;
|
|
122
|
+
static get observedAttributes(): string[];
|
|
123
|
+
constructor();
|
|
124
|
+
get textTracks(): HeliosTextTrackList;
|
|
125
|
+
addTextTrack(kind: string, label?: string, language?: string): HeliosTextTrack;
|
|
126
|
+
handleTrackModeChange(track: HeliosTextTrack): void;
|
|
127
|
+
attributeChangedCallback(name: string, oldVal: string, newVal: string): void;
|
|
128
|
+
private updateControlsVisibility;
|
|
129
|
+
get inputProps(): Record<string, any> | null;
|
|
130
|
+
set inputProps(val: Record<string, any> | null);
|
|
131
|
+
connectedCallback(): void;
|
|
132
|
+
disconnectedCallback(): void;
|
|
133
|
+
private loadIframe;
|
|
134
|
+
private handleBigPlayClick;
|
|
135
|
+
private updatePosterVisibility;
|
|
136
|
+
private setControlsDisabled;
|
|
137
|
+
private lockPlaybackControls;
|
|
138
|
+
private handleIframeLoad;
|
|
139
|
+
private startConnectionAttempts;
|
|
140
|
+
private stopConnectionAttempts;
|
|
141
|
+
private handleWindowMessage;
|
|
142
|
+
private handleSlotChange;
|
|
143
|
+
private setController;
|
|
144
|
+
private updateAspectRatio;
|
|
145
|
+
private togglePlayPause;
|
|
146
|
+
private toggleMute;
|
|
147
|
+
private handleVolumeInput;
|
|
148
|
+
private handleScrubberInput;
|
|
149
|
+
private handleScrubStart;
|
|
150
|
+
private handleScrubEnd;
|
|
151
|
+
private handleScrubberHover;
|
|
152
|
+
private handleScrubberLeave;
|
|
153
|
+
private handleSpeedChange;
|
|
154
|
+
private toggleCaptions;
|
|
155
|
+
private handleKeydown;
|
|
156
|
+
private seekRelative;
|
|
157
|
+
private toggleFullscreen;
|
|
158
|
+
private updateFullscreenUI;
|
|
159
|
+
private updateUI;
|
|
160
|
+
private showStatus;
|
|
161
|
+
private hideStatus;
|
|
162
|
+
getController(): HeliosController | null;
|
|
163
|
+
getSchema(): Promise<HeliosSchema | undefined>;
|
|
164
|
+
private retryConnection;
|
|
165
|
+
private renderClientSide;
|
|
166
|
+
}
|