@phenixrts/sdk 2025.2.4-beta.727 → 2025.2.4-beta.728
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 +120 -13
- package/channels/debug/package.json +1 -1
- package/channels/debug.private/channels.js +120 -13
- package/channels/debug.private/package.json +1 -1
- package/channels/debug.provideGlobalScope/channels.js +120 -13
- package/channels/debug.provideGlobalScope/package.json +1 -1
- package/channels/es5.debug.private/channels.js +120 -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 +120 -13
- package/full/debug/package.json +1 -1
- package/full/debug.private/full.js +120 -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/IShakaPlayer.d.ts +14 -0
- package/types/sdk/streaming/ShakaPlayer.d.ts +19 -1
package/publish/package.json
CHANGED
|
@@ -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;
|
|
@@ -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
|
}
|