@npo/player 2.0.0-beta.2 → 2.0.0-beta.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/dist/{logErrorEvent-hrCMPT15.js → logErrorEvent-DFT_9vtG.js} +1 -1
- package/dist/{main-BmfZ6YEj.js → main-AavFz3q_.js} +10577 -10426
- package/dist/main.d.ts +18 -5
- package/dist/{npoplayer-audio.es.js → npoplayer.es.js} +1 -1
- package/dist/npoplayer.umd.js +128 -0
- package/dist/utilities/index.d.ts +7 -0
- package/dist/utilities/simpleEventTarget.d.ts +10 -0
- package/dist/utilities/utilities.browser.d.ts +3 -0
- package/dist/utilities/utilities.decideThumbnailSrc.d.ts +6 -0
- package/dist/utilities/utilities.dom.d.ts +15 -0
- package/dist/utilities/utilities.images.d.ts +4 -0
- package/dist/utilities/utilities.jwt.d.ts +1 -0
- package/dist/utilities/utilities.logging.d.ts +1 -0
- package/dist/utilities/utilities.numbers.d.ts +6 -0
- package/dist/utilities/utilities.observables.d.ts +28 -0
- package/dist/utilities/utilities.random.d.ts +1 -0
- package/dist/utilities/utilities.stream.d.ts +8 -0
- package/dist/utilities/utilities.text.d.ts +7 -0
- package/dist/utilities/utilities.url.d.ts +14 -0
- package/dist/utilities/utlities.avtype.d.ts +2 -0
- package/dist/utilities.es.js +93 -0
- package/package.json +10 -6
- package/dist/npoplayer-audio.umd.js +0 -128
package/dist/main.d.ts
CHANGED
|
@@ -92,6 +92,8 @@ declare class CastService {
|
|
|
92
92
|
private boundMediaListeners;
|
|
93
93
|
private currentAvailability;
|
|
94
94
|
private checkCastAvailabilityIntervalId;
|
|
95
|
+
private userStoppedCast;
|
|
96
|
+
private pendingPause;
|
|
95
97
|
constructor(player: PlayerApi, receiverApplicationId: string);
|
|
96
98
|
destroy(): void;
|
|
97
99
|
private initializeCastCheckInterval;
|
|
@@ -115,6 +117,9 @@ declare class CastService {
|
|
|
115
117
|
private attachMediaListeners;
|
|
116
118
|
private updateCastState;
|
|
117
119
|
private syncCastAndPlayer;
|
|
120
|
+
private waitForMediaSession;
|
|
121
|
+
private syncPlayState;
|
|
122
|
+
private syncTimePosition;
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
declare interface Chapter {
|
|
@@ -419,7 +424,7 @@ export declare interface IPlayerApi {
|
|
|
419
424
|
}): void;
|
|
420
425
|
getSelectedTextTrack(): TextTrack | undefined;
|
|
421
426
|
removeAllTextTracks(): void;
|
|
422
|
-
getTextTracks():
|
|
427
|
+
getTextTracks(): ReadonlyArray<IPlayerTextTrack>;
|
|
423
428
|
getVariantTracks?(): Array<unknown>;
|
|
424
429
|
isFullscreenPossible(): boolean;
|
|
425
430
|
enterFullscreen(): void;
|
|
@@ -554,6 +559,12 @@ declare interface IPlayerState {
|
|
|
554
559
|
volume: number;
|
|
555
560
|
}
|
|
556
561
|
|
|
562
|
+
declare interface IPlayerTextTrack {
|
|
563
|
+
language: string;
|
|
564
|
+
label?: string;
|
|
565
|
+
active: boolean;
|
|
566
|
+
}
|
|
567
|
+
|
|
557
568
|
declare interface ISegment {
|
|
558
569
|
inpoint: number;
|
|
559
570
|
outpoint: number;
|
|
@@ -762,6 +773,7 @@ declare abstract class NpoPlayerCore {
|
|
|
762
773
|
streamOptions: StreamOptions;
|
|
763
774
|
private readonly ready;
|
|
764
775
|
private readonly loadStreamService;
|
|
776
|
+
private loadGeneration;
|
|
765
777
|
readonly cast: {
|
|
766
778
|
isAvailable: () => boolean;
|
|
767
779
|
isActive: () => boolean;
|
|
@@ -915,7 +927,6 @@ declare class PlayerApi implements IPlayerApi {
|
|
|
915
927
|
private displayModeHandler;
|
|
916
928
|
private isInitialized;
|
|
917
929
|
private _player;
|
|
918
|
-
private currentStreamMode;
|
|
919
930
|
private streamLoadingData?;
|
|
920
931
|
private readonly mediaEventListeners;
|
|
921
932
|
get player(): default_2.Player;
|
|
@@ -925,6 +936,7 @@ declare class PlayerApi implements IPlayerApi {
|
|
|
925
936
|
getPlayerContainer(): HTMLElement;
|
|
926
937
|
load(source: string, streamLoadingData?: IPlayerLoad): Promise<void>;
|
|
927
938
|
unload(): Promise<void>;
|
|
939
|
+
setStreamLoadingData(streamLoadingData: IPlayerLoad): void;
|
|
928
940
|
play(): Promise<void>;
|
|
929
941
|
pause(): void;
|
|
930
942
|
togglePlayPause(): Promise<void>;
|
|
@@ -960,7 +972,7 @@ declare class PlayerApi implements IPlayerApi {
|
|
|
960
972
|
}): void;
|
|
961
973
|
getSelectedTextTrack(): TextTrack | undefined;
|
|
962
974
|
removeAllTextTracks(): void;
|
|
963
|
-
getTextTracks():
|
|
975
|
+
getTextTracks(): ReadonlyArray<IPlayerTextTrack>;
|
|
964
976
|
isFullscreenPossible(): boolean;
|
|
965
977
|
enterFullscreen(): void;
|
|
966
978
|
exitFullscreen(): void;
|
|
@@ -970,6 +982,7 @@ declare class PlayerApi implements IPlayerApi {
|
|
|
970
982
|
exitPip(): Promise<void>;
|
|
971
983
|
configure(config: default_2.extern.PlayerConfiguration): void;
|
|
972
984
|
private applyPersistedSettings;
|
|
985
|
+
private applyPlaybackRateForCurrentStream;
|
|
973
986
|
private setupPlaybackRateHandler;
|
|
974
987
|
private initAirPlayService;
|
|
975
988
|
private forwardAllMediaEvents;
|
|
@@ -1059,8 +1072,8 @@ export declare type PlayNext = {
|
|
|
1059
1072
|
showPlayNext?: boolean;
|
|
1060
1073
|
duration?: number;
|
|
1061
1074
|
offset?: number;
|
|
1062
|
-
proceedCallback?: () => void
|
|
1063
|
-
cancelCallback?: () => void
|
|
1075
|
+
proceedCallback?: () => void | Promise<void>;
|
|
1076
|
+
cancelCallback?: () => void | Promise<void>;
|
|
1064
1077
|
};
|
|
1065
1078
|
|
|
1066
1079
|
export declare const PROFILE_DASH = "dash";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as s, f as o, D as d, L as M, e as P, d as i, b as p, M as r, N as t, a as y, P as A, h as D, i as E, T as L, a as R } from "./main-
|
|
1
|
+
import { g as s, f as o, D as d, L as M, e as P, d as i, b as p, M as r, N as t, a as y, P as A, h as D, i as E, T as L, a as R } from "./main-AavFz3q_.js";
|
|
2
2
|
export {
|
|
3
3
|
s as DRM_FAIRPLAY,
|
|
4
4
|
o as DRM_PLAYREADY,
|