@ngxsplayer/ngx-smart-player 0.0.1-next.1 → 0.2.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 +21 -0
- package/fesm2022/ngxsplayer-ngx-smart-player.mjs +5570 -1192
- package/fesm2022/ngxsplayer-ngx-smart-player.mjs.map +1 -1
- package/package.json +9 -8
- package/types/ngxsplayer-ngx-smart-player.d.ts +1423 -0
- package/index.d.ts +0 -147
package/index.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { PlayerConfig, PlayerPlugin, PlayerPorts, EngineFactory, PlayerState, MediaTrack, PlayerError, MetadataProvider, SubtitleProvider } from '@ngxsp/core';
|
|
2
|
-
export * from '@ngxsp/core';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { OnInit, OnDestroy, EventEmitter, ElementRef, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
5
|
-
import { SourceProfile } from '@ngxsplayer/ngx-smart-player-ui-core';
|
|
6
|
-
|
|
7
|
-
declare class SmartPlayerComponent implements OnInit, OnDestroy {
|
|
8
|
-
config: PlayerConfig;
|
|
9
|
-
plugins: PlayerPlugin[];
|
|
10
|
-
ports?: Partial<PlayerPorts>;
|
|
11
|
-
engines?: EngineFactory[];
|
|
12
|
-
debug: boolean;
|
|
13
|
-
/** Optional start time (seconds) used for "resume playback". */
|
|
14
|
-
startTimeSec: number | null;
|
|
15
|
-
canPrev: boolean;
|
|
16
|
-
canNext: boolean;
|
|
17
|
-
shuffleActive: boolean;
|
|
18
|
-
shuffleLabel: string;
|
|
19
|
-
repeatMode: 'off' | 'one' | 'all';
|
|
20
|
-
repeatLabel: string;
|
|
21
|
-
hasPlaylistControls: boolean;
|
|
22
|
-
mediaMode: 'video' | 'audio';
|
|
23
|
-
castEnabled: boolean;
|
|
24
|
-
ended: EventEmitter<void>;
|
|
25
|
-
videoSize: EventEmitter<{
|
|
26
|
-
width: number;
|
|
27
|
-
height: number;
|
|
28
|
-
}>;
|
|
29
|
-
/** Emits playback position updates. */
|
|
30
|
-
progress: EventEmitter<{
|
|
31
|
-
currentTime: number;
|
|
32
|
-
duration: number;
|
|
33
|
-
}>;
|
|
34
|
-
prev: EventEmitter<void>;
|
|
35
|
-
next: EventEmitter<void>;
|
|
36
|
-
toggleShuffle: EventEmitter<void>;
|
|
37
|
-
cycleRepeat: EventEmitter<void>;
|
|
38
|
-
subtitles: EventEmitter<void>;
|
|
39
|
-
cast: EventEmitter<void>;
|
|
40
|
-
videoEl: ElementRef<HTMLVideoElement>;
|
|
41
|
-
state: PlayerState | null;
|
|
42
|
-
duration: number;
|
|
43
|
-
currentTime: number;
|
|
44
|
-
volume: number;
|
|
45
|
-
private lastVolumeBeforeMute;
|
|
46
|
-
playbackRate: number;
|
|
47
|
-
bufferAheadSec: number;
|
|
48
|
-
tracks: MediaTrack[];
|
|
49
|
-
openMenu: 'tracks' | 'speed' | null;
|
|
50
|
-
controlsVisible: boolean;
|
|
51
|
-
castState: 'disconnected' | 'connecting' | 'connected';
|
|
52
|
-
readonly playbackRates: number[];
|
|
53
|
-
private facade;
|
|
54
|
-
private readonly cdr;
|
|
55
|
-
private sub;
|
|
56
|
-
private hideControlsTimer;
|
|
57
|
-
private remotePlaybackCleanup;
|
|
58
|
-
get uiSkin(): 'classic' | 'netflix';
|
|
59
|
-
get uiVisible(): boolean;
|
|
60
|
-
get displayTitle(): string;
|
|
61
|
-
get displaySubtitle(): string;
|
|
62
|
-
get isAudioMode(): boolean;
|
|
63
|
-
/** Profil de source transmis aux primitives UI (cf. @ngxsp/ui-core). */
|
|
64
|
-
get sourceProfile(): SourceProfile;
|
|
65
|
-
get audioTracks(): MediaTrack[];
|
|
66
|
-
get textTracks(): MediaTrack[];
|
|
67
|
-
get videoTracks(): MediaTrack[];
|
|
68
|
-
get selectedAudioTrackId(): string | null;
|
|
69
|
-
get selectedTextTrackId(): string | null;
|
|
70
|
-
get selectedVideoTrackId(): string | null;
|
|
71
|
-
ngOnInit(): void;
|
|
72
|
-
ngOnDestroy(): void;
|
|
73
|
-
tryPlay(): void;
|
|
74
|
-
get debugJson(): string;
|
|
75
|
-
get currentError(): PlayerError | null;
|
|
76
|
-
copyDebug(): Promise<void>;
|
|
77
|
-
downloadDebug(): void;
|
|
78
|
-
togglePlay(): void;
|
|
79
|
-
seekRel(deltaSec: number): void;
|
|
80
|
-
onScrub(value: number): void;
|
|
81
|
-
onVolume(value: number): void;
|
|
82
|
-
toggleMute(): void;
|
|
83
|
-
setPlaybackRate(rate: number): Promise<void>;
|
|
84
|
-
reload(): void;
|
|
85
|
-
onLoadedMetadata(): void;
|
|
86
|
-
onEnded(): void;
|
|
87
|
-
toggleFullscreen(): void;
|
|
88
|
-
toggleMenu(menu: 'tracks' | 'speed'): void;
|
|
89
|
-
selectTextTrack(trackId: string | null): Promise<void>;
|
|
90
|
-
selectAudioTrack(trackId: string): Promise<void>;
|
|
91
|
-
selectVideoTrack(trackId: string | null): Promise<void>;
|
|
92
|
-
togglePiP(): Promise<void>;
|
|
93
|
-
isPiPSupported(): boolean;
|
|
94
|
-
pipLabel(): string;
|
|
95
|
-
isPiPActive(): boolean;
|
|
96
|
-
requestCast(): Promise<void>;
|
|
97
|
-
isCastSupported(): boolean;
|
|
98
|
-
isCastActive(): boolean;
|
|
99
|
-
showCastButton(): boolean;
|
|
100
|
-
castLabel(): string;
|
|
101
|
-
castHintLabel(): string;
|
|
102
|
-
onCastClick(): void;
|
|
103
|
-
captionsLabel(): string;
|
|
104
|
-
volumeLabel(): string;
|
|
105
|
-
playbackRateLabel(): string;
|
|
106
|
-
statusLabel(): string;
|
|
107
|
-
keyboardHintLabel(): string;
|
|
108
|
-
tracksButtonLabel(): string;
|
|
109
|
-
onPrimarySurfaceDoubleClick(): void;
|
|
110
|
-
bufferPercent(): number;
|
|
111
|
-
fmtTime(sec: number): string;
|
|
112
|
-
noop(): void;
|
|
113
|
-
onInteraction(persist?: boolean): void;
|
|
114
|
-
onPointerLeave(): void;
|
|
115
|
-
onRootClick(event: MouseEvent): void;
|
|
116
|
-
onEscape(): void;
|
|
117
|
-
onKeydown(event: KeyboardEvent): void;
|
|
118
|
-
private bindRemotePlaybackState;
|
|
119
|
-
private syncControlVisibility;
|
|
120
|
-
private clearHideControlsTimer;
|
|
121
|
-
private isInteractiveTarget;
|
|
122
|
-
emitNext(): void;
|
|
123
|
-
emitPrev(): void;
|
|
124
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SmartPlayerComponent, never>;
|
|
125
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SmartPlayerComponent, "ngx-smart-player", never, { "config": { "alias": "config"; "required": true; }; "plugins": { "alias": "plugins"; "required": false; }; "ports": { "alias": "ports"; "required": false; }; "engines": { "alias": "engines"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "startTimeSec": { "alias": "startTimeSec"; "required": false; }; "canPrev": { "alias": "canPrev"; "required": false; }; "canNext": { "alias": "canNext"; "required": false; }; "shuffleActive": { "alias": "shuffleActive"; "required": false; }; "shuffleLabel": { "alias": "shuffleLabel"; "required": false; }; "repeatMode": { "alias": "repeatMode"; "required": false; }; "repeatLabel": { "alias": "repeatLabel"; "required": false; }; "hasPlaylistControls": { "alias": "hasPlaylistControls"; "required": false; }; "mediaMode": { "alias": "mediaMode"; "required": false; }; "castEnabled": { "alias": "castEnabled"; "required": false; }; }, { "ended": "ended"; "videoSize": "videoSize"; "progress": "progress"; "prev": "prev"; "next": "next"; "toggleShuffle": "toggleShuffle"; "cycleRepeat": "cycleRepeat"; "subtitles": "subtitles"; "cast": "cast"; }, never, never, true, never>;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* Jetons d'injection typés pour les providers de sous-titres / métadonnées.
|
|
130
|
-
* (Remplace les jetons `string` non typés — cf. docs/AUDIT.md, manquement #10.)
|
|
131
|
-
* Un consommateur peut les injecter directement :
|
|
132
|
-
* `inject(SMART_PLAYER_SUBTITLE_PROVIDERS)`.
|
|
133
|
-
*/
|
|
134
|
-
declare const SMART_PLAYER_SUBTITLE_PROVIDERS: InjectionToken<SubtitleProvider[]>;
|
|
135
|
-
declare const SMART_PLAYER_METADATA_PROVIDERS: InjectionToken<MetadataProvider[]>;
|
|
136
|
-
interface SmartPlayerProvidersConfig {
|
|
137
|
-
subtitleProviders?: SubtitleProvider[];
|
|
138
|
-
metadataProviders?: MetadataProvider[];
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Enregistre les implémentations de providers (sous-titres / métadonnées).
|
|
142
|
-
* À appeler dans le tableau `providers` de `bootstrapApplication()`.
|
|
143
|
-
*/
|
|
144
|
-
declare function provideSmartPlayer(cfg: SmartPlayerProvidersConfig): EnvironmentProviders;
|
|
145
|
-
|
|
146
|
-
export { SMART_PLAYER_METADATA_PROVIDERS, SMART_PLAYER_SUBTITLE_PROVIDERS, SmartPlayerComponent, provideSmartPlayer };
|
|
147
|
-
export type { SmartPlayerProvidersConfig };
|