@stream-io/video-client 1.15.7 → 1.16.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.
- package/CHANGELOG.md +17 -0
- package/dist/index.browser.es.js +188 -102
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +192 -106
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +188 -102
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +18 -2
- package/dist/src/coordinator/connection/types.d.ts +4 -4
- package/dist/src/gen/coordinator/index.d.ts +1876 -2591
- package/dist/src/store/CallState.d.ts +2 -3
- package/index.ts +0 -1
- package/package.json +1 -1
- package/src/Call.ts +53 -2
- package/src/coordinator/connection/types.ts +4 -4
- package/src/devices/CameraManager.ts +25 -4
- package/src/devices/__tests__/CameraManager.test.ts +14 -4
- package/src/devices/__tests__/mocks.ts +4 -1
- package/src/gen/coordinator/index.ts +2762 -3476
- package/src/store/CallState.ts +18 -26
- package/src/store/__tests__/CallState.test.ts +13 -1
- package/src/store/stateStore.ts +2 -0
- package/dist/src/gen/shims.d.ts +0 -41
- package/src/gen/shims.ts +0 -44
package/dist/src/Call.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Publisher, Subscriber } from './rtc';
|
|
2
2
|
import { CallState } from './store';
|
|
3
|
-
import type { AcceptCallResponse, BlockUserResponse, CallRingEvent, CallSettingsResponse, CollectUserFeedbackResponse, EndCallResponse, GetCallResponse, GetCallStatsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, JoinCallResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersResponse, PinRequest, PinResponse, QueryCallMembersRequest, QueryCallMembersResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, SendCallEventResponse, SendReactionRequest, SendReactionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveResponse, StopRecordingResponse, StopTranscriptionResponse, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse, VideoDimension } from './gen/coordinator';
|
|
3
|
+
import type { AcceptCallResponse, BlockUserResponse, CallRingEvent, CallSettingsResponse, CollectUserFeedbackResponse, DeleteCallRequest, DeleteCallResponse, EndCallResponse, GetCallResponse, GetCallStatsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, JoinCallResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersResponse, PinRequest, PinResponse, QueryCallMembersRequest, QueryCallMembersResponse, RejectCallResponse, RequestPermissionRequest, RequestPermissionResponse, SendCallEventResponse, SendReactionRequest, SendReactionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRecordingRequest, StartRecordingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRecordingResponse, StopRTMPBroadcastsResponse, StopTranscriptionResponse, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse, VideoDimension } from './gen/coordinator';
|
|
4
4
|
import { AudioTrackType, CallConstructor, CallLeaveOptions, ClientPublishOptions, ClosedCaptionsSettings, JoinCallData, TrackMuteType, VideoTrackType } from './types';
|
|
5
5
|
import { TrackType } from './gen/video/sfu/models/models';
|
|
6
6
|
import { DynascaleManager } from './helpers/DynascaleManager';
|
|
@@ -172,6 +172,10 @@ export declare class Call {
|
|
|
172
172
|
* @param data the data to create the call with.
|
|
173
173
|
*/
|
|
174
174
|
create: (data?: GetOrCreateCallRequest) => Promise<GetOrCreateCallResponse>;
|
|
175
|
+
/**
|
|
176
|
+
* Deletes the call.
|
|
177
|
+
*/
|
|
178
|
+
delete: (data?: DeleteCallRequest) => Promise<DeleteCallResponse>;
|
|
175
179
|
/**
|
|
176
180
|
* A shortcut for {@link Call.get} with `ring` parameter set to `true`.
|
|
177
181
|
* Will send a `call.ring` event to the call members.
|
|
@@ -509,7 +513,7 @@ export declare class Call {
|
|
|
509
513
|
/**
|
|
510
514
|
* Stops the livestreaming of the call.
|
|
511
515
|
*/
|
|
512
|
-
stopLive: () => Promise<StopLiveResponse>;
|
|
516
|
+
stopLive: (data?: StopLiveRequest) => Promise<StopLiveResponse>;
|
|
513
517
|
/**
|
|
514
518
|
* Starts the broadcasting of the call.
|
|
515
519
|
*/
|
|
@@ -518,6 +522,18 @@ export declare class Call {
|
|
|
518
522
|
* Stops the broadcasting of the call.
|
|
519
523
|
*/
|
|
520
524
|
stopHLS: () => Promise<StopHLSBroadcastingResponse>;
|
|
525
|
+
/**
|
|
526
|
+
* Starts the RTMP-out broadcasting of the call.
|
|
527
|
+
*/
|
|
528
|
+
startRTMPBroadcasts: (data: StartRTMPBroadcastsRequest) => Promise<StartRTMPBroadcastsResponse>;
|
|
529
|
+
/**
|
|
530
|
+
* Stops all RTMP-out broadcasting of the call.
|
|
531
|
+
*/
|
|
532
|
+
stopAllRTMPBroadcasts: () => Promise<StopAllRTMPBroadcastsResponse>;
|
|
533
|
+
/**
|
|
534
|
+
* Stops the RTMP-out broadcasting of the call specified by it's name.
|
|
535
|
+
*/
|
|
536
|
+
stopRTMPBroadcast: (name: string) => Promise<StopRTMPBroadcastsResponse>;
|
|
521
537
|
/**
|
|
522
538
|
* Updates the call settings or custom data.
|
|
523
539
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
-
import { ConnectedEvent, UserRequest,
|
|
2
|
+
import { ConnectedEvent, UserRequest, VideoEvent } from '../../gen/coordinator';
|
|
3
3
|
import { AllSfuEvents } from '../../rtc';
|
|
4
4
|
export type UR = Record<string, unknown>;
|
|
5
5
|
export type User = (Omit<UserRequest, 'role'> & {
|
|
@@ -55,13 +55,13 @@ export type TransportChangedEvent = {
|
|
|
55
55
|
export type ConnectionRecoveredEvent = {
|
|
56
56
|
type: 'connection.recovered';
|
|
57
57
|
};
|
|
58
|
-
export type StreamVideoEvent = (
|
|
58
|
+
export type StreamVideoEvent = (VideoEvent | NetworkChangedEvent | ConnectionChangedEvent | TransportChangedEvent | ConnectionRecoveredEvent) & {
|
|
59
59
|
received_at?: string | Date;
|
|
60
60
|
};
|
|
61
61
|
export type StreamCallEvent = Extract<StreamVideoEvent, {
|
|
62
62
|
call_cid: string;
|
|
63
63
|
}>;
|
|
64
|
-
export type EventTypes = 'all' |
|
|
64
|
+
export type EventTypes = 'all' | VideoEvent['type'];
|
|
65
65
|
export type AllClientEventTypes = 'all' | StreamVideoEvent['type'];
|
|
66
66
|
export type AllClientEvents = {
|
|
67
67
|
[K in AllClientEventTypes]: Extract<StreamVideoEvent, {
|
|
@@ -70,7 +70,7 @@ export type AllClientEvents = {
|
|
|
70
70
|
};
|
|
71
71
|
export type ClientEventListener<E extends keyof AllClientEvents> = (event: AllClientEvents[E]) => void;
|
|
72
72
|
export type AllClientCallEvents = {
|
|
73
|
-
[K in EventTypes]: Extract<
|
|
73
|
+
[K in EventTypes]: Extract<VideoEvent, {
|
|
74
74
|
type: K;
|
|
75
75
|
}>;
|
|
76
76
|
};
|