@100mslive/hms-video-store 0.14.8-alpha.1 → 0.15.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/dist/connection/subscribe/subscribeConnection.d.ts +21 -0
- package/dist/device-manager/AudioOutputManager.d.ts +2 -2
- package/dist/index.cjs.js +7 -7
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.js +7 -7
- package/dist/index.js.map +3 -3
- package/dist/media/tracks/HMSAudioTrack.d.ts +6 -2
- package/dist/media/tracks/HMSLocalAudioTrack.d.ts +1 -0
- package/dist/media/tracks/HMSLocalVideoTrack.d.ts +5 -0
- package/dist/media/tracks/VideoElementManager.d.ts +8 -0
- package/dist/notification-manager/managers/TrackManager.d.ts +7 -0
- package/dist/sdk/store/Store.d.ts +9 -0
- package/dist/test/helpers/makeRemoteAudioTrack.d.ts +19 -0
- package/package.json +2 -2
|
@@ -19,13 +19,34 @@ export default class HMSSubscribeConnection extends HMSConnection {
|
|
|
19
19
|
private readonly RESPONSE_TIMEOUT;
|
|
20
20
|
readonly nativeConnection: RTCPeerConnection;
|
|
21
21
|
private pendingMessageQueue;
|
|
22
|
+
/** `${method}:${track_id}` -> the id of the newest request for it; older ones stop retrying */
|
|
23
|
+
private latestRequestPerState;
|
|
24
|
+
private closed;
|
|
25
|
+
/**
|
|
26
|
+
* Rejectors for the waits currently parked on the api data channel. close() fires them so a
|
|
27
|
+
* leave or an SFU migration settles every pending request at once, rather than each waiting out
|
|
28
|
+
* its RESPONSE_TIMEOUT first - the catch below breaks on `closed`, so it is one timeout per
|
|
29
|
+
* track, but that is still 10s of nothing per tile on every leave.
|
|
30
|
+
*/
|
|
31
|
+
private pendingAborts;
|
|
22
32
|
private apiChannel?;
|
|
23
33
|
private eventEmitter;
|
|
24
34
|
private initNativeConnectionCallbacks;
|
|
25
35
|
constructor(signal: JsonRpcSignal, config: RTCConfiguration, isFlagEnabled: (flag: InitFlags) => boolean, observer: ISubscribeConnectionObserver);
|
|
26
36
|
sendOverApiDataChannel(message: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* A retry replays the bytes serialised here, so a request still retrying after a newer one has
|
|
39
|
+
* been made for the same track would re-apply state the caller has moved on from. Each request
|
|
40
|
+
* claims its piece of subscription state, and stops once it no longer holds the claim.
|
|
41
|
+
*/
|
|
27
42
|
sendOverApiDataChannelWithResponse<T extends PreferAudioLayerParams | PreferVideoLayerParams>(message: T, requestId?: string): Promise<PreferLayerResponse>;
|
|
28
43
|
close(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Settles `wait` early if the connection is closed while it is parked on the api data channel.
|
|
46
|
+
* The wait is cancelled rather than just abandoned: eventemitter2 keeps the listener subscribed
|
|
47
|
+
* until its own timeout otherwise, and the emitter is capped at 60.
|
|
48
|
+
*/
|
|
49
|
+
private abortOnClose;
|
|
29
50
|
private handlePendingApiMessages;
|
|
30
51
|
private sendMessage;
|
|
31
52
|
/**
|
|
@@ -4,14 +4,14 @@ export interface IAudioOutputManager {
|
|
|
4
4
|
getDevice(): MediaDeviceInfo | undefined;
|
|
5
5
|
setDevice(deviceId: string): Promise<MediaDeviceInfo | undefined>;
|
|
6
6
|
getVolume(): number;
|
|
7
|
-
setVolume(value: number): void
|
|
7
|
+
setVolume(value: number): Promise<void>;
|
|
8
8
|
}
|
|
9
9
|
export declare class AudioOutputManager implements IAudioOutputManager {
|
|
10
10
|
private deviceManager;
|
|
11
11
|
private audioSinkManager;
|
|
12
12
|
constructor(deviceManager: DeviceManager, audioSinkManager: AudioSinkManager);
|
|
13
13
|
getVolume(): number;
|
|
14
|
-
setVolume(value: number): void
|
|
14
|
+
setVolume(value: number): Promise<void>;
|
|
15
15
|
getDevice(): MediaDeviceInfo | undefined;
|
|
16
16
|
setDevice(deviceId?: string): Promise<MediaDeviceInfo | undefined>;
|
|
17
17
|
unblockAutoplay(): Promise<void>;
|