@100mslive/hms-video-store 0.14.7 → 0.14.8-alpha.1

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.
@@ -9,6 +9,14 @@ export default class HMSSubscribeConnection extends HMSConnection {
9
9
  private readonly remoteStreams;
10
10
  protected readonly observer: ISubscribeConnectionObserver;
11
11
  private readonly MAX_RETRIES;
12
+ /**
13
+ * Bounds both waits on the api data channel - for it to open, and for a reply. The first request
14
+ * of a session has been seen to go unanswered, and a channel that is closed or replaced never
15
+ * emits 'open' again; unbounded, either leaves that caller waiting for the rest of the session.
16
+ * Deliberately generous: a retry replays the original serialized request, so a premature one can
17
+ * apply stale desired state over a newer request.
18
+ */
19
+ private readonly RESPONSE_TIMEOUT;
12
20
  readonly nativeConnection: RTCPeerConnection;
13
21
  private pendingMessageQueue;
14
22
  private apiChannel?;
@@ -20,5 +28,11 @@ export default class HMSSubscribeConnection extends HMSConnection {
20
28
  close(): void;
21
29
  private handlePendingApiMessages;
22
30
  private sendMessage;
31
+ /**
32
+ * Checked per attempt rather than once up front: 'open' is emitted from the channel's onopen, so
33
+ * a channel that is closed or replaced never emits again and an unbounded wait here would hang
34
+ * the caller for the rest of the session.
35
+ */
36
+ private waitForChannelOpen;
23
37
  private waitForResponse;
24
38
  }