@vkontakte/calls-sdk 2.8.5-dev.70c56a40.0 → 2.8.5-dev.7186ce24.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/static/Utils.d.ts CHANGED
@@ -7,8 +7,8 @@ export declare const PARAMETERS_SEPARATOR = ":";
7
7
  export declare const DEVICE_IDX_PARAMETER = "d";
8
8
  /** @hidden */
9
9
  declare namespace Utils {
10
- function patchLocalSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
11
- function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9Encoder: boolean): string;
10
+ function patchLocalSDP(sdp: string, preferH264: boolean, brokenH264Decoder: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
11
+ function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9Encoder: boolean, brokenVP9Decoder: boolean): string;
12
12
  function getPeerIdString(peerId: SignalingMessage.PeerId): string;
13
13
  function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
14
14
  function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<{
@@ -31,7 +31,7 @@ declare namespace Utils {
31
31
  deviceIdx: number;
32
32
  };
33
33
  function uuid(): string;
34
- function throttle(func: Function, ms: number): (this: any) => void;
34
+ function debounce(func: Function, ms: number): (this: any) => void;
35
35
  function sdpFingerprint(sdp: string): bigint | null;
36
36
  function delay(time: number): Promise<unknown>;
37
37
  function applySettings(pc: RTCPeerConnection, videoSettings: VideoSettings, prevSettings: any): any;
@@ -121,13 +121,17 @@ declare namespace WebRTCUtils {
121
121
  */
122
122
  function isScreenCapturingSupported(): boolean;
123
123
  /**
124
- * В некоторых браузерах H264 сломан
124
+ * В некоторых браузерах H264 decoder сломан
125
125
  */
126
- function isBrokenH264(): boolean;
126
+ function isBrokenH264Decoder(): boolean;
127
127
  /**
128
128
  * В некоторых браузерах VP9 encoder сломан
129
129
  */
130
130
  function isBrokenVP9Encoder(): boolean;
131
+ /**
132
+ * В некоторых браузерах VP9 decoder сломан
133
+ */
134
+ function isBrokenVP9Decoder(): boolean;
131
135
  /**
132
136
  * Изменился формат описания датаканала в SDP
133
137
  * @link https://blog.mozilla.org/webrtc/how-to-avoid-data-channel-breaking/
@@ -0,0 +1,3 @@
1
+ export type EnableVideoSuspendSuggest = {
2
+ enabled: boolean;
3
+ };
@@ -44,6 +44,11 @@ export interface ParticipantStateMapped {
44
44
  ts: number;
45
45
  };
46
46
  }
47
+ export type ParticipantsStateList = {
48
+ externalId: ExternalParticipantId;
49
+ participantState: ParticipantStateMapped;
50
+ markers: ExternalParticipantListMarkers | null;
51
+ }[];
47
52
  export interface Participant {
48
53
  /**
49
54
  * string representation
@@ -1,3 +1,4 @@
1
+ import { AnimojiVersion } from '@vkontakte/calls-vmoji';
1
2
  import { TransportTopology } from '../classes/transport/Transport';
2
3
  import ChatRoomEventType from '../enums/ChatRoomEventType';
3
4
  import ConversationFeature from '../enums/ConversationFeature';
@@ -5,6 +6,7 @@ import ConversationOption from '../enums/ConversationOption';
5
6
  import FatalError from '../enums/FatalError';
6
7
  import HangupType from '../enums/HangupType';
7
8
  import MediaOption from '../enums/MediaOption';
9
+ import MuteState from '../enums/MuteState';
8
10
  import ParticipantState from '../enums/ParticipantState';
9
11
  import RoomsEventType from '../enums/RoomsEventType';
10
12
  import SignalingCommandType from '../enums/SignalingCommandType';
@@ -162,6 +164,7 @@ declare namespace SignalingMessage {
162
164
  data: {
163
165
  candidate?: RTCIceCandidateInit;
164
166
  sdp?: Required<RTCSessionDescriptionInit>;
167
+ animojiVersion?: AnimojiVersion;
165
168
  };
166
169
  }
167
170
  export interface RegisteredPeer extends Notification {
@@ -210,6 +213,17 @@ declare namespace SignalingMessage {
210
213
  };
211
214
  markers?: ParticipantListMarkers;
212
215
  }
216
+ export interface ParticipantsStateChanged extends Notification {
217
+ participants: {
218
+ id: CompositeUserId;
219
+ participantState?: {
220
+ state: Record<string, string>;
221
+ stateUpdateTs: Record<string, number>;
222
+ };
223
+ markers?: ParticipantListMarkers;
224
+ }[];
225
+ roomId?: IRoomId;
226
+ }
213
227
  export interface RolesChanged extends Notification {
214
228
  adminId: ParticipantId;
215
229
  participantId: ParticipantId;
@@ -319,6 +333,8 @@ declare namespace SignalingMessage {
319
333
  mediaModifiers: MediaModifiers;
320
334
  conversation: Conversation;
321
335
  participants?: ParticipantListChunk;
336
+ muteState?: MuteState;
337
+ muteOptions?: MediaOption[];
322
338
  }
323
339
  export interface ChatRoomUpdated extends Notification {
324
340
  eventType: ChatRoomEventType;
@@ -355,6 +371,8 @@ declare namespace SignalingMessage {
355
371
  rooms: Room[];
356
372
  roomId?: number;
357
373
  };
374
+ muteState?: MuteState;
375
+ muteOptions?: MediaOption[];
358
376
  }
359
377
  export interface Feedback extends Notification {
360
378
  feedback: IFeedback[];
@@ -427,6 +445,9 @@ declare namespace SignalingMessage {
427
445
  decorativeParticipantId?: CompositeUserId;
428
446
  decorativeExternalParticipantId?: ExternalId;
429
447
  }
448
+ export interface VideoSuspendSuggest extends Notification {
449
+ bandwidth: number;
450
+ }
430
451
  export {};
431
452
  }
432
453
  export default SignalingMessage;
@@ -6,7 +6,6 @@ export interface IStartStreamData {
6
6
  groupId: string | null;
7
7
  roomId: number | null;
8
8
  streamMovie: boolean;
9
- externalAccessKey: string | null;
10
9
  }
11
10
  export interface IStopStreamData {
12
11
  roomId: number | null;
@@ -19,7 +19,7 @@ export type VideoSettings = {
19
19
  * Настройка деградации - понижаем фпс или разрешение
20
20
  * https://www.w3.org/TR/mst-content-hint/#dom-rtcdegradationpreference
21
21
  */
22
- degradationPreference: string;
22
+ degradationPreference: RTCDegradationPreference;
23
23
  /**
24
24
  * Настройка временных слоев
25
25
  * https://www.w3.org/TR/webrtc-svc/
@@ -1,2 +1,4 @@
1
- import { MuteState, MediaOption, MuteStates } from '../CallsSDK';
1
+ import MediaOption from '../enums/MediaOption';
2
+ import MuteState from '../enums/MuteState';
3
+ import MuteStates from '../types/MuteStates';
2
4
  export declare const getMediaOptionsByMuteState: (muteStates: MuteStates, value: MuteState) => MediaOption[];