@vkontakte/calls-sdk 2.8.12-dev.ec5956ec.0 → 2.8.12-dev.ecf77be8.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.
@@ -58,6 +58,8 @@ export declare class MediaSource extends EventEmitter {
58
58
  private readonly _videoEffectsFpsLimiter?;
59
59
  private readonly _debug;
60
60
  private readonly _logger;
61
+ private _cameraTrackSetAt;
62
+ private _cameraMuteRecoveredAt;
61
63
  constructor(debug?: DebugLogger, logger?: StatsLogger | null);
62
64
  get cameraVideoTrack(): MediaStreamTrack | null;
63
65
  set cameraVideoTrack(track: MediaStreamTrack | null);
@@ -97,6 +99,8 @@ export declare class MediaSource extends EventEmitter {
97
99
  protected getSilentAudioShareTrack(): MediaStreamTrack;
98
100
  protected getBlackScreenShareTrack(): MediaStreamTrack;
99
101
  protected _replaceLocalTrack(newTrack: MediaStreamTrack, sendTrack?: MediaStreamTrack): Promise<void>;
102
+ protected _replaceTrack(oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack, sendTrack?: MediaStreamTrack): Promise<void>;
103
+ protected _addLocalTrack(newTrack: MediaStreamTrack, sendTrack?: MediaStreamTrack): Promise<void>;
100
104
  private _setEffect;
101
105
  private _stopEffect;
102
106
  destroy(): void;
@@ -114,6 +114,7 @@ export default class Conversation extends EventEmitter {
114
114
  updateStatisticsInterval(): void;
115
115
  private _openTransport;
116
116
  private _allocateParticipantTransport;
117
+ private _closeParticipantTransport;
117
118
  private _cleanupRegistry;
118
119
  private _emitHangupOnce;
119
120
  private _close;
@@ -4,9 +4,13 @@ import StatsLogger from '../StatsLogger';
4
4
  export declare class StatAggregator {
5
5
  private readonly _logger;
6
6
  private readonly _eventualLogs;
7
+ private _lastCallStatContext;
7
8
  constructor(logger: StatsLogger);
8
9
  logCallStat(params: ICallStatLog): void;
9
10
  /** @link https://wiki.odkl.ru/pages/viewpage.action?pageId=100892588 */
10
11
  logEventualStat(params: IEventualStatLog): void;
11
12
  destroy(): void;
13
+ private _getCallStatContext;
14
+ private _flushEventualStats;
15
+ private _logEventualStat;
12
16
  }
@@ -70,7 +70,7 @@ export default class Signaling extends BaseSignaling {
70
70
  connect(connectionType: SignalingConnectionType): Promise<SignalingMessage.Connection>;
71
71
  getNextCommandSequenceNumber(): number;
72
72
  hangup(reason: string): Promise<SignalingMessage>;
73
- sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
73
+ sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidateInit): Promise<SignalingMessage>;
74
74
  requestTestMode(consumerCommand: string, producerCommand: string | null): Promise<SignalingMessage>;
75
75
  sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit, extraPayload?: Record<string, any>): Promise<SignalingMessage>;
76
76
  acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vkontakte/calls-sdk",
3
- "version": "2.8.12-dev.ec5956ec.0",
3
+ "version": "2.8.12-dev.ecf77be8.0",
4
4
  "author": "vk.com",
5
5
  "description": "Library for video calls based on the vk.com platform",
6
6
  "homepage": "https://vk.com",
@@ -22,6 +22,6 @@
22
22
  "fflate": "^0.8.2",
23
23
  "messagepack": "1.1.12",
24
24
  "simple-ebml-builder": "0.2.2",
25
- "webrtc-adapter": "7.7.0"
25
+ "webrtc-adapter": "9.0.5"
26
26
  }
27
27
  }
@@ -505,6 +505,16 @@ export type ParamsObject = {
505
505
  * _По умолчанию: `false`_
506
506
  */
507
507
  enableSessionStateUpdates: boolean;
508
+ /**
509
+ * Использовать `<audio>` вместо `<video>` для воспроизведения звука в desktop Safari
510
+ * @hidden
511
+ */
512
+ safariAudioElement: boolean;
513
+ /**
514
+ * Отправлять пустой ICE candidate (end-of-candidates) удалённому пиру
515
+ * @hidden
516
+ */
517
+ forwardEmptyIceCandidate: boolean;
508
518
  /**
509
519
  * Получен локальный стрим с камеры/микрофона
510
520
  */
@@ -1027,6 +1037,8 @@ export default abstract class Params {
1027
1037
  static get waitForRecordResponse(): boolean;
1028
1038
  static get transparentAudio(): boolean;
1029
1039
  static get enableSessionStateUpdates(): boolean;
1040
+ static get safariAudioElement(): boolean;
1041
+ static get forwardEmptyIceCandidate(): boolean;
1030
1042
  static toJSON(): {
1031
1043
  apiKey: string;
1032
1044
  apiEnv: string;
@@ -1063,5 +1075,7 @@ export default abstract class Params {
1063
1075
  waitForRecordResponse: boolean;
1064
1076
  transparentAudio: boolean;
1065
1077
  enableSessionStateUpdates: boolean;
1078
+ safariAudioElement: boolean;
1079
+ forwardEmptyIceCandidate: boolean;
1066
1080
  };
1067
1081
  }
package/static/Utils.d.ts CHANGED
@@ -9,7 +9,7 @@ export declare const DEVICE_IDX_PARAMETER = "d";
9
9
  /** @hidden */
10
10
  declare namespace Utils {
11
11
  function patchLocalSDP(sdp: string, preferH264: boolean, brokenH264Decoder: boolean, preferVP9: boolean, isAudioNack?: boolean): string;
12
- function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9Encoder: boolean, brokenVP9Decoder: boolean): string;
12
+ function patchRemoteSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9Encoder: boolean, brokenVP9Decoder: boolean): string;
13
13
  function getPeerIdString(peerId: SignalingMessage.PeerId): string;
14
14
  function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
15
15
  function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<{
@@ -20,7 +20,7 @@ export declare enum FacingMode {
20
20
  /**
21
21
  * Известные браузеры
22
22
  */
23
- export type BrowserName = 'IE' | 'Edge' | 'Chrome' | 'Firefox' | 'Yandex' | 'Opera' | 'Sferum';
23
+ export type BrowserName = 'Edge' | 'Chrome' | 'Firefox' | 'Yandex' | 'Opera' | 'Sferum';
24
24
  declare namespace WebRTCUtils {
25
25
  /**
26
26
  * До вызова этого метода бесполезно опрашивать другие публичные методы.
@@ -143,17 +143,14 @@ declare namespace WebRTCUtils {
143
143
  * В некоторых браузерах VP9 decoder сломан
144
144
  */
145
145
  function isBrokenVP9Decoder(): boolean;
146
- /**
147
- * Изменился формат описания датаканала в SDP
148
- * @link https://blog.mozilla.org/webrtc/how-to-avoid-data-channel-breaking/
149
- */
150
- function isOldDataChannelDescription(): boolean;
151
146
  /**
152
147
  * Может ли браузер делать H264 приоритетным
153
148
  */
154
149
  function canPreferH264(): boolean;
155
150
  /**
156
- * Некоторые браузеры (Firefox, Safari) некорректно поддерживают симулкаст
151
+ * Поддержка simulcast браузером.
152
+ * Safari корректно поддерживает simulcast начиная с версии 18.
153
+ * Firefox поддерживает simulcast с VP8 начиная с версии 134.
157
154
  */
158
155
  function isSimulcastSupportedByBrowser(): boolean;
159
156
  /**
@@ -188,7 +188,6 @@ declare namespace SignalingMessage {
188
188
  peerId: PeerId;
189
189
  mediaSettings: Partial<MediaSettings>;
190
190
  capabilities?: string;
191
- externalId?: ExternalId;
192
191
  }
193
192
  export interface Hungup extends Notification {
194
193
  participantId: OkUserId;
@@ -2,8 +2,8 @@ type Device = 'camera' | 'microphone';
2
2
  type PermissionStatusState = typeof PermissionStatus.prototype.state;
3
3
  type EventListener = (name: Device, state: PermissionStatusState) => void;
4
4
  export declare class NavigatorPermissions {
5
- private _cameraPermissionStatus;
6
- private _microphonePermissionStatus;
5
+ private _cameraPermissionStatus?;
6
+ private _microphonePermissionStatus?;
7
7
  private _listener;
8
8
  static isSupported(): boolean;
9
9
  init(listener: EventListener): Promise<void>;