@phenixrts/sdk 2025.2.4-beta.729 → 2025.2.4-beta.731
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/channels/debug/channels.js +346 -62
- package/channels/debug/package.json +1 -1
- package/channels/debug.private/channels.js +376 -48
- package/channels/debug.private/package.json +1 -1
- package/channels/debug.provideGlobalScope/channels.js +346 -62
- package/channels/debug.provideGlobalScope/package.json +1 -1
- package/channels/es5.debug.private/channels.js +365 -48
- package/channels/es5.debug.private/package.json +1 -1
- package/channels/min/channels.js +1 -1
- package/channels/min/channels.js.map +1 -1
- package/channels/min/package.json +1 -1
- package/channels/min.private/channels.js +1 -1
- package/channels/min.private/channels.js.map +1 -1
- package/channels/min.private/package.json +1 -1
- package/channels/min.provideGlobalScope/channels.js +1 -1
- package/channels/min.provideGlobalScope/channels.js.map +1 -1
- package/channels/min.provideGlobalScope/package.json +1 -1
- package/channels/package.json +1 -1
- package/full/debug/full.js +346 -62
- package/full/debug/package.json +1 -1
- package/full/debug.private/full.js +376 -48
- package/full/debug.private/package.json +1 -1
- package/full/min/full.js +1 -1
- package/full/min/full.js.map +1 -1
- package/full/min/package.json +1 -1
- package/full/min.private/full.js +1 -1
- package/full/min.private/full.js.map +1 -1
- package/full/min.private/package.json +1 -1
- package/full/package.json +1 -1
- package/package.json +1 -1
- package/publish/debug/package.json +1 -1
- package/publish/debug/publish.js +1 -1
- package/publish/debug.private/package.json +1 -1
- package/publish/debug.private/publish.js +1 -1
- package/publish/min/package.json +1 -1
- package/publish/min/publish.js +1 -1
- package/publish/min.private/package.json +1 -1
- package/publish/min.private/publish.js +1 -1
- package/publish/package.json +1 -1
- package/types/sdk/replay/ChannelReplay.d.ts +5 -2
- package/types/sdk/replay/ReplayAudioTrackSelector.d.ts +18 -0
- package/types/sdk/replay/ReplayController.d.ts +6 -2
- package/types/sdk/replay/player/IReplayPlayer.d.ts +2 -0
- package/types/sdk/replay/player/ReplayHlsJsPlayer.d.ts +14 -1
- package/types/sdk/replay/player/ReplayNativeHlsPlayer.d.ts +17 -1
- package/types/sdk/replay/player/ReplayPlayerFactory.d.ts +2 -2
- package/types/sdk/streaming/AudioRenditionName.d.ts +5 -0
- package/types/sdk/streaming/HlsJsAudioRenditions.d.ts +6 -0
package/publish/package.json
CHANGED
|
@@ -5,15 +5,17 @@ import { IGetReplayManifestResponse } from '../api/Replay';
|
|
|
5
5
|
import { ChannelReplayOptions, IChannelReplay, IReplayWindow, ReplayError } from '../channels/IChannelReplay';
|
|
6
6
|
import ReplayState from '../channels/ReplayState';
|
|
7
7
|
import ReplayContext from '../context/ReplayContext';
|
|
8
|
-
import
|
|
8
|
+
import { ReplayPlayerWithAudioRenditions } from './player/IReplayPlayer';
|
|
9
9
|
import MediaStreamRealTimePresentation from './presentation/MediaStreamRealTimePresentation';
|
|
10
|
+
import { ReplayAudioTrackPreferences } from './ReplayAudioTrackSelector';
|
|
10
11
|
export type ChannelReplayDependencies = {
|
|
11
12
|
getVideoElement: () => HTMLVideoElement | null;
|
|
12
13
|
getToken: () => EncodedEdgeToken;
|
|
13
14
|
getBaseUri: (token: EncodedEdgeToken) => string;
|
|
14
15
|
createRealTimePresentation: (videoElement: HTMLVideoElement) => MediaStreamRealTimePresentation;
|
|
16
|
+
getAudioTrackPreferences: () => ReplayAudioTrackPreferences;
|
|
15
17
|
getManifest?: (token: EncodedEdgeToken, startTime: number, endTime: number) => Promise<IGetReplayManifestResponse>;
|
|
16
|
-
createPlayer?: (videoElement: HTMLVideoElement) => Promise<
|
|
18
|
+
createPlayer?: (videoElement: HTMLVideoElement) => Promise<ReplayPlayerWithAudioRenditions>;
|
|
17
19
|
isPlayerSupported?: () => boolean;
|
|
18
20
|
now?: () => number;
|
|
19
21
|
};
|
|
@@ -42,6 +44,7 @@ export default class ChannelReplay implements IChannelReplay, IDisposable {
|
|
|
42
44
|
returnToRealTime(): Promise<void>;
|
|
43
45
|
refreshSupport(): void;
|
|
44
46
|
onVideoElementChanged(): void;
|
|
47
|
+
applyAudioTrackSelection(): void;
|
|
45
48
|
reset(): void;
|
|
46
49
|
dispose(): void;
|
|
47
50
|
private computeIsSupported;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import IDisposable from '../../lang/IDisposable';
|
|
2
|
+
import { IAudioTrack } from '../channels/IAudioTrack';
|
|
3
|
+
import { IAudioRenditionPlayer } from '../streaming/IAudioRenditionPlayer';
|
|
4
|
+
export type ReplayAudioTrackPreferences = {
|
|
5
|
+
readonly requestedAudioTrack: IAudioTrack | null;
|
|
6
|
+
readonly audioLanguages: readonly string[];
|
|
7
|
+
readonly maxAudioTracks: number;
|
|
8
|
+
};
|
|
9
|
+
export default class ReplayAudioTrackSelector implements IDisposable {
|
|
10
|
+
private readonly _logger;
|
|
11
|
+
private readonly _player;
|
|
12
|
+
private readonly _getPreferences;
|
|
13
|
+
private readonly _disposables;
|
|
14
|
+
constructor(player: IAudioRenditionPlayer, getPreferences: () => ReplayAudioTrackPreferences);
|
|
15
|
+
applyAudioTrackSelection(): void;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
private selectAudioRendition;
|
|
18
|
+
}
|
|
@@ -3,16 +3,18 @@ import { EncodedEdgeToken } from '../../edgeAuth/EncodedEdgeToken';
|
|
|
3
3
|
import { IGetReplayManifestResponse } from '../api/Replay';
|
|
4
4
|
import { ChannelReplayOptions } from '../channels/IChannelReplay';
|
|
5
5
|
import ReplayContext from '../context/ReplayContext';
|
|
6
|
-
import
|
|
6
|
+
import { ReplayPlayerWithAudioRenditions } from './player/IReplayPlayer';
|
|
7
7
|
import MediaStreamRealTimePresentation from './presentation/MediaStreamRealTimePresentation';
|
|
8
8
|
import ReplayPresentation from './presentation/ReplayPresentation';
|
|
9
|
+
import { ReplayAudioTrackPreferences } from './ReplayAudioTrackSelector';
|
|
9
10
|
export type ReplayControllerDependencies = {
|
|
10
11
|
context: ReplayContext;
|
|
11
12
|
presentation: ReplayPresentation;
|
|
12
13
|
realTime: MediaStreamRealTimePresentation;
|
|
13
14
|
getManifest: (token: EncodedEdgeToken, startTime: number, endTime: number) => Promise<IGetReplayManifestResponse>;
|
|
14
|
-
createPlayer: (videoElement: HTMLVideoElement) => Promise<
|
|
15
|
+
createPlayer: (videoElement: HTMLVideoElement) => Promise<ReplayPlayerWithAudioRenditions>;
|
|
15
16
|
isPlayerSupported: () => boolean;
|
|
17
|
+
getAudioTrackPreferences: () => ReplayAudioTrackPreferences;
|
|
16
18
|
now?: () => number;
|
|
17
19
|
};
|
|
18
20
|
export default class ReplayController implements IDisposable {
|
|
@@ -22,11 +24,13 @@ export default class ReplayController implements IDisposable {
|
|
|
22
24
|
private readonly _now;
|
|
23
25
|
private _player;
|
|
24
26
|
private _sessionDisposables;
|
|
27
|
+
private _audioTrackSelector;
|
|
25
28
|
private _isDisposed;
|
|
26
29
|
private _epoch;
|
|
27
30
|
constructor(dependencies: ReplayControllerDependencies);
|
|
28
31
|
start(token: EncodedEdgeToken, options: ChannelReplayOptions): Promise<void>;
|
|
29
32
|
returnToRealTime(): Promise<void>;
|
|
33
|
+
applyAudioTrackSelection(): void;
|
|
30
34
|
dispose(): void;
|
|
31
35
|
private hasSession;
|
|
32
36
|
private refuseWhenBusy;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import IDisposable from '../../../lang/IDisposable';
|
|
2
2
|
import ReadOnlySubject from '../../../rx/ReadOnlySubject';
|
|
3
|
+
import { IAudioRenditionPlayer } from '../../streaming/IAudioRenditionPlayer';
|
|
3
4
|
import { ReplayPlaybackError } from '../ReplaySessionError';
|
|
4
5
|
interface IReplayPlayer extends IDisposable {
|
|
5
6
|
readonly ended: ReadOnlySubject<boolean>;
|
|
@@ -7,4 +8,5 @@ interface IReplayPlayer extends IDisposable {
|
|
|
7
8
|
play(manifestUrl: string): Promise<void>;
|
|
8
9
|
stop(): void;
|
|
9
10
|
}
|
|
11
|
+
export type ReplayPlayerWithAudioRenditions = IReplayPlayer & IAudioRenditionPlayer;
|
|
10
12
|
export default IReplayPlayer;
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
import DisposableList from '../../../lang/DisposableList';
|
|
2
2
|
import ReadOnlySubject from '../../../rx/ReadOnlySubject';
|
|
3
3
|
import { HlsErrorTypes, HlsPlayerType, IHlsEventData, IHlsLevel, ReplayHlsPlayerConfig } from '../../streaming/IHlsPlayer';
|
|
4
|
+
import AudioRenditions from '../../streaming/AudioRenditions';
|
|
5
|
+
import { IAudioRenditionFailure, IAudioRenditionPlayer, IAudioRenditionSelection } from '../../streaming/IAudioRenditionPlayer';
|
|
4
6
|
import { ReplayFailureStatus } from '../ReplayStatus';
|
|
5
7
|
import { ReplayPlaybackError } from '../ReplaySessionError';
|
|
6
8
|
import IReplayPlayer from './IReplayPlayer';
|
|
7
9
|
import IReplayMediaSource from './IReplayMediaSource';
|
|
8
10
|
export declare const replayHlsConfig: ReplayHlsPlayerConfig;
|
|
9
|
-
export default class ReplayHlsJsPlayer implements IReplayPlayer, IReplayMediaSource {
|
|
11
|
+
export default class ReplayHlsJsPlayer implements IReplayPlayer, IReplayMediaSource, IAudioRenditionPlayer {
|
|
10
12
|
private readonly _logger;
|
|
11
13
|
private readonly _videoElement;
|
|
12
14
|
private readonly _Hls;
|
|
13
15
|
private readonly _lifecycle;
|
|
16
|
+
private readonly _audioRenditions;
|
|
17
|
+
private readonly _readOnlyAudioRenditions;
|
|
18
|
+
private readonly _audioRenditionFailure;
|
|
19
|
+
private readonly _readOnlyAudioRenditionFailure;
|
|
20
|
+
private readonly _audioRenditionSelectedByViewer;
|
|
14
21
|
private _hls;
|
|
15
22
|
private _lastSegmentNumber;
|
|
16
23
|
private _isTailMissing;
|
|
24
|
+
private _selectedAudioRenditionName;
|
|
17
25
|
constructor(videoElement: HTMLVideoElement, Hls: HlsPlayerType);
|
|
18
26
|
static findHighestLevel(levels: IHlsLevel[]): number;
|
|
19
27
|
static isMediaRequest(details?: string): boolean;
|
|
@@ -22,12 +30,17 @@ export default class ReplayHlsJsPlayer implements IReplayPlayer, IReplayMediaSou
|
|
|
22
30
|
static mapHlsErrorToStatus(data: IHlsEventData, errorTypes?: Pick<HlsErrorTypes, 'KEY_SYSTEM_ERROR'>): ReplayFailureStatus;
|
|
23
31
|
get ended(): ReadOnlySubject<boolean>;
|
|
24
32
|
get fatalError(): ReadOnlySubject<ReplayPlaybackError | null>;
|
|
33
|
+
get audioRenditions(): ReadOnlySubject<AudioRenditions | null>;
|
|
34
|
+
get audioRenditionFailure(): ReadOnlySubject<IAudioRenditionFailure | null>;
|
|
35
|
+
get audioRenditionSelectedByViewer(): ReadOnlySubject<IAudioRenditionSelection | null>;
|
|
25
36
|
load(manifestUrl: string, session: DisposableList): Promise<void>;
|
|
26
37
|
play(manifestUrl: string): Promise<void>;
|
|
38
|
+
selectAudioRendition(name: string): void;
|
|
27
39
|
release(): void;
|
|
28
40
|
stop(): void;
|
|
29
41
|
dispose(): void;
|
|
30
42
|
private selectStartLevel;
|
|
43
|
+
private applyAudioRenditionSelection;
|
|
31
44
|
private isMissingTailSegment;
|
|
32
45
|
private endIfPlayedOut;
|
|
33
46
|
private reachableBufferedEnd;
|
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
import DisposableList from '../../../lang/DisposableList';
|
|
2
2
|
import ReadOnlySubject from '../../../rx/ReadOnlySubject';
|
|
3
|
+
import AudioRenditions from '../../streaming/AudioRenditions';
|
|
4
|
+
import { IAudioRenditionFailure, IAudioRenditionPlayer, IAudioRenditionSelection } from '../../streaming/IAudioRenditionPlayer';
|
|
3
5
|
import { ReplayPlaybackError } from '../ReplaySessionError';
|
|
4
6
|
import IReplayPlayer from './IReplayPlayer';
|
|
5
7
|
import IReplayMediaSource from './IReplayMediaSource';
|
|
6
8
|
export declare const nativeHlsMimeType = "application/vnd.apple.mpegurl";
|
|
7
|
-
export default class ReplayNativeHlsPlayer implements IReplayPlayer, IReplayMediaSource {
|
|
9
|
+
export default class ReplayNativeHlsPlayer implements IReplayPlayer, IReplayMediaSource, IAudioRenditionPlayer {
|
|
8
10
|
private readonly _logger;
|
|
9
11
|
private readonly _videoElement;
|
|
10
12
|
private readonly _lifecycle;
|
|
13
|
+
private readonly _audioRenditions;
|
|
14
|
+
private readonly _readOnlyAudioRenditions;
|
|
15
|
+
private readonly _audioRenditionFailure;
|
|
16
|
+
private readonly _readOnlyAudioRenditionFailure;
|
|
17
|
+
private readonly _audioRenditionSelectedByViewer;
|
|
18
|
+
private readonly _readOnlyAudioRenditionSelectedByViewer;
|
|
19
|
+
private _selectedAudioRenditionName;
|
|
20
|
+
private _isDisposed;
|
|
11
21
|
constructor(videoElement: HTMLVideoElement);
|
|
12
22
|
static isSupportedBy(videoElement: HTMLVideoElement): boolean;
|
|
13
23
|
get ended(): ReadOnlySubject<boolean>;
|
|
14
24
|
get fatalError(): ReadOnlySubject<ReplayPlaybackError | null>;
|
|
25
|
+
get audioRenditions(): ReadOnlySubject<AudioRenditions | null>;
|
|
26
|
+
get audioRenditionFailure(): ReadOnlySubject<IAudioRenditionFailure | null>;
|
|
27
|
+
get audioRenditionSelectedByViewer(): ReadOnlySubject<IAudioRenditionSelection | null>;
|
|
15
28
|
play(manifestUrl: string): Promise<void>;
|
|
29
|
+
selectAudioRendition(name: string): void;
|
|
16
30
|
load(manifestUrl: string, session: DisposableList): Promise<void>;
|
|
17
31
|
release(): void;
|
|
18
32
|
stop(): void;
|
|
19
33
|
dispose(): void;
|
|
34
|
+
private readAudioRenditions;
|
|
35
|
+
private followViewerSelection;
|
|
20
36
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReplayPlayerWithAudioRenditions } from './IReplayPlayer';
|
|
2
2
|
export default class ReplayPlayerFactory {
|
|
3
3
|
private static readonly _logger;
|
|
4
4
|
static isSupported(): boolean;
|
|
5
5
|
static playsNatively(): boolean;
|
|
6
|
-
static create(videoElement: HTMLVideoElement): Promise<
|
|
6
|
+
static create(videoElement: HTMLVideoElement): Promise<ReplayPlayerWithAudioRenditions>;
|
|
7
7
|
private constructor();
|
|
8
8
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { IAudioSection } from '../context/IAudioSection';
|
|
2
|
+
export type NamedAudioSection = {
|
|
3
|
+
readonly section: IAudioSection;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
};
|
|
2
6
|
export default class AudioRenditionName {
|
|
3
7
|
static parse(name: string): IAudioSection | null;
|
|
8
|
+
static parseEachSourceIndexOnce(names: readonly string[]): NamedAudioSection[];
|
|
4
9
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import AudioRenditions from './AudioRenditions';
|
|
2
|
+
import { IHlsEventData, IHlsPlayerType } from './IHlsPlayer';
|
|
3
|
+
export default class HlsJsAudioRenditions {
|
|
4
|
+
static readFromParsedManifest(data: IHlsEventData): AudioRenditions;
|
|
5
|
+
static select(hls: IHlsPlayerType, name: string): void;
|
|
6
|
+
}
|