@stream-io/video-client 1.18.6 → 1.18.7
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/CHANGELOG.md +8 -0
- package/dist/index.browser.es.js +7 -6
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +7 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +7 -6
- package/dist/index.es.js.map +1 -1
- package/dist/src/coordinator/connection/types.d.ts +2 -2
- package/dist/src/rtc/BasePeerConnection.d.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +5 -2
- package/src/coordinator/connection/types.ts +2 -2
- package/src/rtc/BasePeerConnection.ts +2 -2
|
@@ -153,5 +153,5 @@ export type ClientAppIdentifier = {
|
|
|
153
153
|
};
|
|
154
154
|
export type TokenProvider = () => Promise<string>;
|
|
155
155
|
export type TokenOrProvider = null | string | TokenProvider | undefined;
|
|
156
|
-
export type BuiltInRejectReason = 'busy' | 'decline' | 'cancel';
|
|
157
|
-
export type RejectReason = BuiltInRejectReason | string;
|
|
156
|
+
export type BuiltInRejectReason = 'busy' | 'decline' | 'cancel' | 'timeout';
|
|
157
|
+
export type RejectReason = BuiltInRejectReason | (string & {});
|
package/package.json
CHANGED
package/src/Call.ts
CHANGED
|
@@ -566,7 +566,7 @@ export class Call {
|
|
|
566
566
|
|
|
567
567
|
if (callingState === CallingState.RINGING && reject !== false) {
|
|
568
568
|
if (reject) {
|
|
569
|
-
await this.reject(
|
|
569
|
+
await this.reject('decline');
|
|
570
570
|
} else {
|
|
571
571
|
// if reject was undefined, we still have to cancel the call automatically
|
|
572
572
|
// when I am the creator and everyone else left the call
|
|
@@ -602,6 +602,7 @@ export class Call {
|
|
|
602
602
|
this.initialized = false;
|
|
603
603
|
this.hasJoinedOnce = false;
|
|
604
604
|
this.ringingSubject.next(false);
|
|
605
|
+
this.cancelAutoDrop();
|
|
605
606
|
this.clientStore.unregisterCall(this);
|
|
606
607
|
|
|
607
608
|
this.camera.dispose();
|
|
@@ -798,7 +799,9 @@ export class Call {
|
|
|
798
799
|
*
|
|
799
800
|
* @param reason the reason for rejecting the call.
|
|
800
801
|
*/
|
|
801
|
-
reject = async (
|
|
802
|
+
reject = async (
|
|
803
|
+
reason: RejectReason = 'decline',
|
|
804
|
+
): Promise<RejectCallResponse> => {
|
|
802
805
|
return this.streamClient.post<RejectCallResponse, RejectCallRequest>(
|
|
803
806
|
`${this.streamClientBasePath}/reject`,
|
|
804
807
|
{ reason: reason },
|
|
@@ -188,5 +188,5 @@ export type ClientAppIdentifier = {
|
|
|
188
188
|
export type TokenProvider = () => Promise<string>;
|
|
189
189
|
export type TokenOrProvider = null | string | TokenProvider | undefined;
|
|
190
190
|
|
|
191
|
-
export type BuiltInRejectReason = 'busy' | 'decline' | 'cancel';
|
|
192
|
-
export type RejectReason = BuiltInRejectReason | string;
|
|
191
|
+
export type BuiltInRejectReason = 'busy' | 'decline' | 'cancel' | 'timeout';
|
|
192
|
+
export type RejectReason = BuiltInRejectReason | (string & {});
|
|
@@ -174,7 +174,7 @@ export abstract class BasePeerConnection {
|
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
const iceCandidate = this.
|
|
177
|
+
const iceCandidate = this.asJSON(candidate);
|
|
178
178
|
this.sfuClient
|
|
179
179
|
.iceTrickle({ peerType: this.peerType, iceCandidate })
|
|
180
180
|
.catch((err) => {
|
|
@@ -186,7 +186,7 @@ export abstract class BasePeerConnection {
|
|
|
186
186
|
/**
|
|
187
187
|
* Converts the ICE candidate to a JSON string.
|
|
188
188
|
*/
|
|
189
|
-
private
|
|
189
|
+
private asJSON = (candidate: RTCIceCandidate): string => {
|
|
190
190
|
if (!candidate.usernameFragment) {
|
|
191
191
|
// react-native-webrtc doesn't include usernameFragment in the candidate
|
|
192
192
|
const segments = candidate.candidate.split(' ');
|