@phenixrts/sdk 2025.2.4-beta.727 → 2025.2.4-beta.729
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 +348 -13
- package/channels/debug/package.json +1 -1
- package/channels/debug.private/channels.js +122 -13
- package/channels/debug.private/package.json +1 -1
- package/channels/debug.provideGlobalScope/channels.js +348 -13
- package/channels/debug.provideGlobalScope/package.json +1 -1
- package/channels/es5.debug.private/channels.js +122 -13
- 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 +348 -13
- package/full/debug/package.json +1 -1
- package/full/debug.private/full.js +122 -13
- 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/streaming/ChunkedAudioTrackSelector.d.ts +22 -0
- package/types/sdk/streaming/ChunkedStreamSubscriber.d.ts +3 -0
- package/types/sdk/streaming/IShakaPlayer.d.ts +14 -0
- package/types/sdk/streaming/IStreamSubscriber.d.ts +1 -0
- package/types/sdk/streaming/ShakaPlayer.d.ts +19 -1
package/publish/package.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import IDisposable from '../../lang/IDisposable';
|
|
2
|
+
import ChannelContext from '../context/ChannelContext';
|
|
3
|
+
import { IAudioRenditionPlayer } from './IAudioRenditionPlayer';
|
|
4
|
+
export default class ChunkedAudioTrackSelector implements IDisposable {
|
|
5
|
+
private readonly _logger;
|
|
6
|
+
private readonly _channelContext;
|
|
7
|
+
private readonly _player;
|
|
8
|
+
private readonly _disposables;
|
|
9
|
+
private _renditionNameBySourceIndex;
|
|
10
|
+
private _playedRenditionName;
|
|
11
|
+
private _previousRenditionName;
|
|
12
|
+
constructor(channelContext: ChannelContext, player: IAudioRenditionPlayer);
|
|
13
|
+
static isAudioRenditionPlayer(player: object): player is IAudioRenditionPlayer;
|
|
14
|
+
applyAudioTrackSelection(): void;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
private applyAudioRenditions;
|
|
17
|
+
private createAudioSections;
|
|
18
|
+
private playAudioSection;
|
|
19
|
+
private findDefaultRenditionName;
|
|
20
|
+
private fallBackFromFailedRendition;
|
|
21
|
+
private followViewerSelection;
|
|
22
|
+
}
|
|
@@ -11,8 +11,11 @@ export default class ChunkedStreamSubscriber implements IStreamSubscriber {
|
|
|
11
11
|
private readonly _handleStreamFailure;
|
|
12
12
|
private _streamStatistics;
|
|
13
13
|
private _monitorFailureCount;
|
|
14
|
+
private _audioTrackSelector;
|
|
15
|
+
private _isDisposed;
|
|
14
16
|
constructor(channelContext: ChannelContext, chunkedStreamPlaybackMode: ChunkedStreamPlaybackMode, handleStreamFailure: () => Promise<void>);
|
|
15
17
|
start(uri: URL, token: string): Promise<void | IDisposable>;
|
|
18
|
+
applyAudioTrackSelection(): void;
|
|
16
19
|
private retryOnStreamFailure;
|
|
17
20
|
private monitor;
|
|
18
21
|
isStreamHealthy(): Promise<boolean>;
|
|
@@ -19,10 +19,24 @@ export type ShakaOptions = {
|
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
+
export interface IShakaVariantTrack {
|
|
23
|
+
label: string | null;
|
|
24
|
+
audioCodec: string | null;
|
|
25
|
+
videoCodec: string | null;
|
|
26
|
+
active: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface IShakaAudioTrack {
|
|
29
|
+
label: string | null;
|
|
30
|
+
active: boolean;
|
|
31
|
+
}
|
|
22
32
|
export interface IShakaPlayer {
|
|
23
33
|
configure: (o: ShakaOptions) => void;
|
|
24
34
|
load: (uri: string) => Promise<void>;
|
|
25
35
|
getStats: () => ChunkedStreamingStatistics;
|
|
36
|
+
getVariantTracks: () => IShakaVariantTrack[];
|
|
37
|
+
selectVariantsByLabel?: (label: string) => void;
|
|
38
|
+
getAudioTracks?: () => IShakaAudioTrack[];
|
|
39
|
+
selectAudioTrack?: (audioTrack: IShakaAudioTrack) => void;
|
|
26
40
|
addEventListener: (key: string, callback: () => void) => void;
|
|
27
41
|
removeEventListener: (key: string, callback: () => void) => void;
|
|
28
42
|
destroy: () => void;
|
|
@@ -3,4 +3,5 @@ import { StreamSetupListener } from '../../dom/StreamSetupListener';
|
|
|
3
3
|
export interface IStreamSubscriber extends IDisposable {
|
|
4
4
|
start(uri: URL, token: string, listenOnStreamSetup?: StreamSetupListener, playMediaStreamInVideoElement?: Function): Promise<void | IDisposable>;
|
|
5
5
|
isStreamHealthy(): Promise<boolean>;
|
|
6
|
+
applyAudioTrackSelection?(): void;
|
|
6
7
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import ReadOnlySubject from '../../rx/ReadOnlySubject';
|
|
1
2
|
import { ChunkedStreamingOptions, ChunkedStreamingStatistics } from './StreamTypes';
|
|
2
|
-
|
|
3
|
+
import AudioRenditions from './AudioRenditions';
|
|
4
|
+
import { IAudioRenditionFailure, IAudioRenditionPlayer, IAudioRenditionSelection } from './IAudioRenditionPlayer';
|
|
5
|
+
export default class ShakaPlayer implements IAudioRenditionPlayer {
|
|
3
6
|
private readonly _logger;
|
|
4
7
|
private readonly _videoElement;
|
|
5
8
|
private readonly _kind;
|
|
@@ -9,10 +12,25 @@ export default class ShakaPlayer {
|
|
|
9
12
|
private readonly _handleStreamFailure;
|
|
10
13
|
private readonly _disposables;
|
|
11
14
|
private readonly _monitoredStatistics;
|
|
15
|
+
private readonly _audioRenditions;
|
|
16
|
+
private readonly _readOnlyAudioRenditions;
|
|
17
|
+
private readonly _audioRenditionFailure;
|
|
18
|
+
private readonly _readOnlyAudioRenditionFailure;
|
|
19
|
+
private readonly _audioRenditionSelectedByViewer;
|
|
12
20
|
private _player;
|
|
21
|
+
private _isLoaded;
|
|
22
|
+
private _selectedAudioRenditionName;
|
|
13
23
|
constructor(videoElement: HTMLVideoElement, kind: string, streamId: string, manifestURI: string, options: ChunkedStreamingOptions, handleStreamFailure: Function);
|
|
24
|
+
get audioRenditions(): ReadOnlySubject<AudioRenditions | null>;
|
|
25
|
+
get audioRenditionFailure(): ReadOnlySubject<IAudioRenditionFailure | null>;
|
|
26
|
+
get audioRenditionSelectedByViewer(): ReadOnlySubject<IAudioRenditionSelection | null>;
|
|
14
27
|
start(): void;
|
|
28
|
+
selectAudioRendition(name: string): void;
|
|
15
29
|
getStats(): ChunkedStreamingStatistics;
|
|
16
30
|
dispose(): void;
|
|
17
31
|
private loadPlayer;
|
|
32
|
+
private readAudioRenditions;
|
|
33
|
+
private applyAudioRenditionSelection;
|
|
34
|
+
private static selectUnlessActive;
|
|
35
|
+
private static carriesAudio;
|
|
18
36
|
}
|