@vkontakte/calls-sdk 2.8.3-dev.d418cb1.0 → 2.8.3
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/CallsSDK.d.ts +3 -1
- package/abstract/BaseApi.d.ts +2 -0
- package/abstract/BaseSignaling.d.ts +2 -2
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +3 -3
- package/classes/LocalVolumeDetector.d.ts +0 -1
- package/classes/MediaSource.d.ts +1 -1
- package/classes/ParticipantIdRegistry.d.ts +0 -5
- package/classes/VolumeDetector.d.ts +3 -2
- package/classes/transport/DirectTransport.d.ts +8 -1
- package/classes/transport/ServerTransport.d.ts +1 -0
- package/classes/transport/Statistics.d.ts +3 -3
- package/classes/transport/Transport.d.ts +3 -6
- package/default/Api.d.ts +3 -1
- package/default/Signaling.d.ts +5 -5
- package/enums/SignalingNotification.d.ts +1 -2
- package/package.json +3 -3
- package/static/Params.d.ts +19 -2
- package/static/Utils.d.ts +4 -5
- package/static/WebRTCUtils.d.ts +9 -1
- package/types/Participant.d.ts +1 -2
- package/types/PerfStatReporter.d.ts +2 -1
- package/types/SignalingCommand.d.ts +1 -0
- package/types/SignalingMessage.d.ts +3 -7
- package/types/Statistics.d.ts +6 -0
- package/types/VideoSettings.d.ts +15 -0
|
@@ -44,6 +44,7 @@ export default class Conversation extends EventEmitter {
|
|
|
44
44
|
private _specListener;
|
|
45
45
|
private _activeSpeakerId;
|
|
46
46
|
private _lastSignalledActiveSpeakerId;
|
|
47
|
+
private _isRealTimeAsrRequested;
|
|
47
48
|
private _serverSettings;
|
|
48
49
|
private static _current;
|
|
49
50
|
private static _activationMutex;
|
|
@@ -203,11 +204,11 @@ export default class Conversation extends EventEmitter {
|
|
|
203
204
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
204
205
|
/** @async */
|
|
205
206
|
feedback(key: string): Promise<SignalingMessage>;
|
|
207
|
+
userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
206
208
|
private _stopStreaming;
|
|
207
209
|
private _sendUpdateDisplayLayout;
|
|
208
210
|
private _cleanupCooldownQueue;
|
|
209
211
|
private _onParticipantSourcesUpdate;
|
|
210
|
-
private _onParticipantSourcesSuspend;
|
|
211
212
|
private _onParticipantPromoted;
|
|
212
213
|
private _onChatRoomUpdated;
|
|
213
214
|
private _onSharedMovieUpdate;
|
|
@@ -220,7 +221,6 @@ export default class Conversation extends EventEmitter {
|
|
|
220
221
|
private _onFeaturesPerRoleChanged;
|
|
221
222
|
private _waitForStreamIfNeeded;
|
|
222
223
|
private _matchStreamDescription;
|
|
223
|
-
private _handleParticipantSuspend;
|
|
224
224
|
private _getWaitingTime;
|
|
225
225
|
private _isCallAdmin;
|
|
226
226
|
private _checkAdminRole;
|
|
@@ -243,7 +243,7 @@ export default class Conversation extends EventEmitter {
|
|
|
243
243
|
private _resolveExternalIds;
|
|
244
244
|
getAudienceModeHands(): Promise<AudienceModeHandsResponse>;
|
|
245
245
|
promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<void>;
|
|
246
|
-
requestPromotion(
|
|
246
|
+
requestPromotion(unrequest?: boolean): Promise<void>;
|
|
247
247
|
acceptPromotion(reject?: boolean): Promise<void>;
|
|
248
248
|
chatMessage(message: string, participantId?: CompositeUserId | null): Promise<void>;
|
|
249
249
|
chatHistory(count: number): Promise<void>;
|
|
@@ -2,7 +2,6 @@ import EventEmitter from './EventEmitter';
|
|
|
2
2
|
import { MediaSource } from './MediaSource';
|
|
3
3
|
export default class LocalVolumeDetector extends EventEmitter {
|
|
4
4
|
private _detector;
|
|
5
|
-
private _track;
|
|
6
5
|
private _interval;
|
|
7
6
|
constructor(mediaSource: MediaSource);
|
|
8
7
|
private init;
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare class MediaSource extends EventEmitter {
|
|
|
42
42
|
getSendVideoTrack(noDataChannel?: boolean): MediaStreamTrack | null;
|
|
43
43
|
getSendAudioTrack(): MediaStreamTrack | null;
|
|
44
44
|
get isAnimojiRequested(): boolean;
|
|
45
|
-
addTrackToPeerConnection(pc: RTCPeerConnection, observer: boolean, noDataChannel: boolean
|
|
45
|
+
addTrackToPeerConnection(pc: RTCPeerConnection, observer: boolean, noDataChannel: boolean): void;
|
|
46
46
|
getMediaSettings(): MediaSettings;
|
|
47
47
|
changeDevice(kind: MediaDeviceKind): Promise<void>;
|
|
48
48
|
/**
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { ParticipantStreamDescription } from '../types/ParticipantStreamDescription';
|
|
2
2
|
import SignalingMessage from '../types/SignalingMessage';
|
|
3
|
-
export type IParticipantSuspendInfoParse = [
|
|
4
|
-
number,
|
|
5
|
-
boolean
|
|
6
|
-
];
|
|
7
3
|
export declare class ParticipantIdRegistry {
|
|
8
4
|
private streamDescriptionByCompactId;
|
|
9
5
|
private compactIdByStreamDescription;
|
|
@@ -11,5 +7,4 @@ export declare class ParticipantIdRegistry {
|
|
|
11
7
|
getCompactId(streamDescription: string): number | undefined;
|
|
12
8
|
handleMessage(data: ArrayBuffer): SignalingMessage | null;
|
|
13
9
|
private _createParticipantSourcesUpdateNotification;
|
|
14
|
-
private _createParticipantSourcesSuspendNotification;
|
|
15
10
|
}
|
|
@@ -9,9 +9,10 @@ export declare class VolumeDetector {
|
|
|
9
9
|
private _mediaStreamSource;
|
|
10
10
|
private _lastSmoothedLevel;
|
|
11
11
|
private readonly _trackId;
|
|
12
|
+
private readonly _track;
|
|
12
13
|
private readonly _stream;
|
|
13
|
-
constructor(id: string,
|
|
14
|
-
get
|
|
14
|
+
constructor(id: string, track: MediaStreamTrack);
|
|
15
|
+
get track(): MediaStreamTrack;
|
|
15
16
|
get trackId(): string;
|
|
16
17
|
private _getBins;
|
|
17
18
|
getLevel(): VolumeLevel;
|
|
@@ -9,6 +9,7 @@ export default class DirectTransport extends BaseTransport {
|
|
|
9
9
|
private readonly _isMaster;
|
|
10
10
|
private _remoteSDP;
|
|
11
11
|
private _remoteCandidates;
|
|
12
|
+
private _lastRemoteSDP;
|
|
12
13
|
private _animojiDataChannel;
|
|
13
14
|
private _animojiReceiver;
|
|
14
15
|
private _animojiSender;
|
|
@@ -29,6 +30,10 @@ export default class DirectTransport extends BaseTransport {
|
|
|
29
30
|
private _lastNetworkStat;
|
|
30
31
|
private _remoteNetworkStat;
|
|
31
32
|
private _networkLimits;
|
|
33
|
+
private _networkLimitsForVideo;
|
|
34
|
+
private _videoMaxDimensionsForNet;
|
|
35
|
+
private _lastVideoMaxDimension;
|
|
36
|
+
private _lastBadConnection;
|
|
32
37
|
private _perfStatReporter;
|
|
33
38
|
constructor(participantId: ParticipantId, isMaster: boolean, signaling: BaseSignaling, mediaSource: MediaSource, serverSettings: ServerSettings);
|
|
34
39
|
get participantId(): ParticipantId;
|
|
@@ -57,9 +62,11 @@ export default class DirectTransport extends BaseTransport {
|
|
|
57
62
|
private _startIceRestart;
|
|
58
63
|
private _createOffer;
|
|
59
64
|
private _createAnswer;
|
|
60
|
-
private static
|
|
65
|
+
private static _patchLocalDescription;
|
|
66
|
+
private static _patchRemoteDescription;
|
|
61
67
|
private _onReplacedTrack;
|
|
62
68
|
private _startStatInterval;
|
|
69
|
+
private _checkPPTNetwork;
|
|
63
70
|
private _stopStatInterval;
|
|
64
71
|
private _checkBadNetwork;
|
|
65
72
|
private _startSettingsInterval;
|
|
@@ -71,6 +71,7 @@ export default class ServerTransport extends BaseTransport {
|
|
|
71
71
|
private _reportStats;
|
|
72
72
|
private _detectStaleTracks;
|
|
73
73
|
private _allocateConsumer;
|
|
74
|
+
private _processOffer;
|
|
74
75
|
private _acceptProducer;
|
|
75
76
|
private _handleTracks;
|
|
76
77
|
private _onSignalingNotification;
|
|
@@ -12,13 +12,13 @@ export declare function extractTransport(stats: RTCStats[]): StatTransport;
|
|
|
12
12
|
* Extracts media statistics from the given stats
|
|
13
13
|
* @hidden
|
|
14
14
|
*/
|
|
15
|
-
export declare function extractRtps(stats: RTCStats[], ssrcMap: Record<string, string
|
|
15
|
+
export declare function extractRtps(stats: RTCStats[], ssrcMap: Record<string, string>, needToExtractRemote?: boolean): StatRtp[];
|
|
16
16
|
/**
|
|
17
17
|
* Computes delta (the difference) between two stat reports.
|
|
18
18
|
* @hidden
|
|
19
19
|
*/
|
|
20
|
-
export declare function delta(current: StatItem, previous: StatItem): StatItem;
|
|
21
|
-
export declare function collectStats(pc: RTCPeerConnection, previous: StatItem | null, ssrcMap?: Record<string, string
|
|
20
|
+
export declare function delta(current: StatItem, previous: StatItem, needToExtractRemote?: boolean): StatItem;
|
|
21
|
+
export declare function collectStats(pc: RTCPeerConnection, previous: StatItem | null, ssrcMap?: Record<string, string>, needToExtractRemote?: boolean): Promise<StatItem>;
|
|
22
22
|
export declare function setMark(name: string): void;
|
|
23
23
|
export declare function clearMark(name: string): void;
|
|
24
24
|
export declare function measureMark(name: string): null | number;
|
|
@@ -82,12 +82,9 @@ export declare class Transport extends EventEmitter {
|
|
|
82
82
|
private _onRemoteStreamSecond;
|
|
83
83
|
private _onPeerConnectionClosed;
|
|
84
84
|
private _onServerAudioMixStall;
|
|
85
|
-
private
|
|
86
|
-
private
|
|
87
|
-
private
|
|
88
|
-
private _onDirectRemoteDataStats;
|
|
89
|
-
private _onServerRemoteTrackAdded;
|
|
90
|
-
private _onServerRemoteTrackRemoved;
|
|
85
|
+
private _onRemoteDataStats;
|
|
86
|
+
private _onRemoteTrackAdded;
|
|
87
|
+
private _onRemoteTrackRemoved;
|
|
91
88
|
private _onAsrTranscription;
|
|
92
89
|
private _onSourceChanged;
|
|
93
90
|
private _onAnimojiStream;
|
package/default/Api.d.ts
CHANGED
|
@@ -16,9 +16,10 @@ export default class Api extends BaseApi {
|
|
|
16
16
|
log(items: LogItem[]): void;
|
|
17
17
|
init(): void;
|
|
18
18
|
joinConversation(conversationId: string, isVideo?: boolean, chatId?: string): Promise<ConversationResponse>;
|
|
19
|
-
createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie, audienceMode, }?: {
|
|
19
|
+
createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie, audienceMode, audioOnly, }?: {
|
|
20
20
|
onlyAdminCanShareMovie?: boolean;
|
|
21
21
|
audienceMode?: boolean;
|
|
22
|
+
audioOnly?: boolean;
|
|
22
23
|
}, speakerIds?: OkUserId[]): Promise<ConversationResponse>;
|
|
23
24
|
startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
|
|
24
25
|
onlyAdminCanShareMovie?: boolean;
|
|
@@ -52,6 +53,7 @@ export default class Api extends BaseApi {
|
|
|
52
53
|
getUserId(): OkUserId | null;
|
|
53
54
|
setUserId(userId: OkUserId): void;
|
|
54
55
|
hangupConversation(conversationId: string): void;
|
|
56
|
+
sendUserFeedbackStats(conversationId: string, userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
55
57
|
removeHistoryRecords(recordIds: number[]): Promise<void>;
|
|
56
58
|
cleanup(): void;
|
|
57
59
|
private _getExternalIdsByOkIds;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -72,18 +72,17 @@ export default class Signaling extends BaseSignaling {
|
|
|
72
72
|
/**
|
|
73
73
|
* Send a command to a signaling server
|
|
74
74
|
*/
|
|
75
|
-
protected _send(command: SignalingCommandType, params?: any, retryCount?: number): Promise<SignalingMessage>;
|
|
75
|
+
protected _send(command: SignalingCommandType, params?: any, needResponse?: boolean, retryCount?: number): Promise<SignalingMessage>;
|
|
76
76
|
/**
|
|
77
77
|
* Send a raw command to a signaling server
|
|
78
78
|
*/
|
|
79
|
-
protected _sendRaw(command: SignalingCommandType, params?: any, retryCount?: number): Promise<SignalingMessage>;
|
|
79
|
+
protected _sendRaw(command: SignalingCommandType, params?: any, needResponse?: boolean, retryCount?: number): Promise<SignalingMessage>;
|
|
80
80
|
private _isDataChannelCommand;
|
|
81
|
-
private static _isDataChannelResponseRequired;
|
|
82
81
|
getNextCommandSequenceNumber(): number;
|
|
83
82
|
hangup(reason: string): Promise<SignalingMessage | void>;
|
|
84
83
|
sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
85
84
|
requestTestMode(consumerCommand: string, producerCommand: string | null): Promise<SignalingMessage>;
|
|
86
|
-
sendSdp(participantId: ParticipantId, sdp:
|
|
85
|
+
sendSdp(participantId: ParticipantId, sdp: RTCSessionDescriptionInit): Promise<SignalingMessage>;
|
|
87
86
|
acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
88
87
|
changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
89
88
|
changeParticipantState(state: {
|
|
@@ -134,7 +133,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
134
133
|
}): Promise<SignalingMessage>;
|
|
135
134
|
getWaitingHall(fromId?: WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
|
|
136
135
|
promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
|
|
137
|
-
requestPromotion(
|
|
136
|
+
requestPromotion(unrequest?: boolean): Promise<SignalingMessage>;
|
|
138
137
|
acceptPromotion(reject?: boolean): Promise<SignalingMessage>;
|
|
139
138
|
feedback(key: string): Promise<SignalingMessage>;
|
|
140
139
|
getHandQueue(): Promise<SignalingMessage>;
|
|
@@ -168,6 +167,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
168
167
|
protected _reconnect(): void;
|
|
169
168
|
private _handleCommandResponse;
|
|
170
169
|
private _handleCommandsQueue;
|
|
170
|
+
private _startResponseTimer;
|
|
171
171
|
private _serializeBinary;
|
|
172
172
|
private _serializeJson;
|
|
173
173
|
private _convertDisplayLayout;
|
|
@@ -46,7 +46,6 @@ declare enum SignalingNotification {
|
|
|
46
46
|
FEATURES_PER_ROLE_CHANGED = "features-per-role-changed",
|
|
47
47
|
PARTICIPANT_ANIMOJI_CHANGED = "participant-animoji-changed",
|
|
48
48
|
ASR_STARTED = "asr-started",
|
|
49
|
-
ASR_STOPPED = "asr-stopped"
|
|
50
|
-
PARTICIPANT_SOURCES_SUSPEND = "participant-sources-suspend"
|
|
49
|
+
ASR_STOPPED = "asr-stopped"
|
|
51
50
|
}
|
|
52
51
|
export default SignalingNotification;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/calls-sdk",
|
|
3
|
-
"version": "2.8.3
|
|
3
|
+
"version": "2.8.3",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Library for video calls based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"**/*.d.ts"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@vkontakte/calls-video-effects": "2.
|
|
18
|
-
"@vkontakte/calls-vmoji": "1.0.8-beta.
|
|
17
|
+
"@vkontakte/calls-video-effects": "2.2.1",
|
|
18
|
+
"@vkontakte/calls-vmoji": "1.0.8-beta.9",
|
|
19
19
|
"@vkontakte/libvpx": "2.0.9",
|
|
20
20
|
"bit-buffer": "0.2.5",
|
|
21
21
|
"messagepack": "1.1.12",
|
package/static/Params.d.ts
CHANGED
|
@@ -158,13 +158,13 @@ export type ParamsObject = {
|
|
|
158
158
|
/**
|
|
159
159
|
* Максимальная ширина видео в пикселях для видео эффекта
|
|
160
160
|
*
|
|
161
|
-
* _По умолчанию: `
|
|
161
|
+
* _По умолчанию: `640`_
|
|
162
162
|
*/
|
|
163
163
|
videoEffectMaxWidth: number;
|
|
164
164
|
/**
|
|
165
165
|
* Максимальная высота видео в пикселях для видео эффекта
|
|
166
166
|
*
|
|
167
|
-
* _По умолчанию: `
|
|
167
|
+
* _По умолчанию: `360`_
|
|
168
168
|
*/
|
|
169
169
|
videoEffectMaxHeight: number;
|
|
170
170
|
/**
|
|
@@ -732,6 +732,14 @@ export type ParamsObject = {
|
|
|
732
732
|
* @param roomId Id комнаты
|
|
733
733
|
*/
|
|
734
734
|
onAsrStopped?: (roomId: number | null) => void;
|
|
735
|
+
/**
|
|
736
|
+
* Получена расшифровка речи
|
|
737
|
+
* @param id Id пользователя, произнесшего реплику
|
|
738
|
+
* @param text Текст расшифровки
|
|
739
|
+
* @param timestamp Время расшифровки
|
|
740
|
+
* @param duration Длительность реплики в расшифровке
|
|
741
|
+
*/
|
|
742
|
+
onAsrTranscription?: (id: ExternalParticipantId, text: string, timestamp: number, duration: number) => void;
|
|
735
743
|
/**
|
|
736
744
|
* Установка начальных параметров текстовой расшифровки звонка. (Используется при входе в звонок/ смене комнаты)
|
|
737
745
|
* @param data Начальная информация по ASR
|
|
@@ -750,6 +758,13 @@ export type ParamsObject = {
|
|
|
750
758
|
* @param demoted участник разжалован
|
|
751
759
|
*/
|
|
752
760
|
onPromoted?: (demoted: boolean) => void;
|
|
761
|
+
/**
|
|
762
|
+
* Поддержка переключения качества видео в зависимости от сети
|
|
763
|
+
* Только для режима p2p
|
|
764
|
+
*
|
|
765
|
+
* _По умолчанию: `false`_
|
|
766
|
+
*/
|
|
767
|
+
switchVideoAtBadNetwork: boolean;
|
|
753
768
|
};
|
|
754
769
|
export default abstract class Params {
|
|
755
770
|
private static _params;
|
|
@@ -828,6 +843,7 @@ export default abstract class Params {
|
|
|
828
843
|
static get networkStatisticsInterval(): number;
|
|
829
844
|
static get perfStatReportEnabled(): boolean;
|
|
830
845
|
static get callStatReportEnabled(): boolean;
|
|
846
|
+
static get enableLogPerfStatReport(): boolean;
|
|
831
847
|
static get producerNotificationDataChannel(): boolean;
|
|
832
848
|
static get producerCommandDataChannel(): boolean;
|
|
833
849
|
static get consumerScreenDataChannel(): boolean;
|
|
@@ -865,4 +881,5 @@ export default abstract class Params {
|
|
|
865
881
|
static get videoSuspend(): boolean;
|
|
866
882
|
static get enumerateDevicesDelay(): number;
|
|
867
883
|
static getScreenFrameRate(fastScreenShare: boolean): number;
|
|
884
|
+
static get switchVideoAtBadNetwork(): boolean;
|
|
868
885
|
}
|
package/static/Utils.d.ts
CHANGED
|
@@ -8,14 +8,13 @@ export declare const DEVICE_IDX_PARAMETER = "d";
|
|
|
8
8
|
/** @hidden */
|
|
9
9
|
declare namespace Utils {
|
|
10
10
|
function patchLocalSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
|
|
11
|
-
function patchRemoteSDP(sdp: string): string;
|
|
11
|
+
function patchRemoteSDP(sdp: string, oldDataChannelDescription: boolean, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, brokenVP9: 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<{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} | null>;
|
|
15
|
+
local: any;
|
|
16
|
+
remote: any;
|
|
17
|
+
}>;
|
|
19
18
|
function composeUserId(id: CompositeUserId | OkUserId, type: UserType): CompositeUserId;
|
|
20
19
|
function composeParticipantId(id: CompositeUserId | OkUserId, type: UserType, deviceIdx?: number): ParticipantId;
|
|
21
20
|
function compose(compositeId: CompositeUserId, deviceIdx?: number): ParticipantId;
|
package/static/WebRTCUtils.d.ts
CHANGED
|
@@ -120,11 +120,19 @@ declare namespace WebRTCUtils {
|
|
|
120
120
|
* В некоторых браузерах H264 сломан
|
|
121
121
|
*/
|
|
122
122
|
function isBrokenH264(): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* В некоторых браузерах VP9 encoder сломан
|
|
125
|
+
*/
|
|
126
|
+
function isBrokenVP9Encoder(): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Изменился формат описания датаканала в SDP
|
|
129
|
+
* @link https://blog.mozilla.org/webrtc/how-to-avoid-data-channel-breaking/
|
|
130
|
+
*/
|
|
131
|
+
function isOldDataChannelDescription(): boolean;
|
|
123
132
|
/**
|
|
124
133
|
* Может ли браузер делать H264 приоритетным
|
|
125
134
|
*/
|
|
126
135
|
function canPreferH264(): boolean;
|
|
127
|
-
function canPreferRed(): boolean;
|
|
128
136
|
/**
|
|
129
137
|
* Имя операционной системы
|
|
130
138
|
*/
|
package/types/Participant.d.ts
CHANGED
|
@@ -50,9 +50,8 @@ export interface Participant {
|
|
|
50
50
|
state: ParticipantState;
|
|
51
51
|
status: ParticipantStatus;
|
|
52
52
|
remoteStream?: MediaStream | null;
|
|
53
|
-
secondStream?: MediaStream | null;
|
|
54
|
-
remoteVideoTrack?: MediaStreamTrack | null;
|
|
55
53
|
remoteAudioTrack?: MediaStreamTrack | null;
|
|
54
|
+
secondStream?: MediaStream | null;
|
|
56
55
|
mediaSource?: MediaStreamAudioSourceNode | null;
|
|
57
56
|
platform: string;
|
|
58
57
|
clientType: string;
|
|
@@ -4,6 +4,7 @@ export interface PerfStatReport {
|
|
|
4
4
|
}
|
|
5
5
|
export interface CallStatReport {
|
|
6
6
|
call_topology: 'D' | 'S';
|
|
7
|
+
stat_time_delta: number;
|
|
7
8
|
nack_sent: number;
|
|
8
9
|
nack_received: number;
|
|
9
10
|
pli_sent: number;
|
|
@@ -35,7 +36,7 @@ export interface CallStatReport {
|
|
|
35
36
|
remote_address?: string;
|
|
36
37
|
remote_connection_type?: RTCIceCandidateType;
|
|
37
38
|
}
|
|
38
|
-
export interface ICallStatLog extends Pick<CallStatReport, 'call_topology' | 'nack_sent' | 'nack_received' | 'pli_sent' | 'pli_received' | 'fir_sent' | 'fir_received' | 'frames_dropped'>, Pick<Partial<CallStatReport>, 'rtt' | 'jitter_video' | 'jitter_audio' | 'interframe_delay_variance' | 'freeze_count' | 'total_freezes_duration' | 'ss_freeze_count' | 'ss_total_freezes_duration' | 'inserted_audio_samples_for_deceleration' | 'removed_audio_samples_for_acceleration' | 'concealed_audio_samples' | 'total_audio_energy' | 'local_address' | 'local_connection_type' | 'network_type' | 'transport' | 'remote_address' | 'remote_connection_type'> {
|
|
39
|
+
export interface ICallStatLog extends Pick<CallStatReport, 'call_topology' | 'nack_sent' | 'nack_received' | 'pli_sent' | 'pli_received' | 'fir_sent' | 'fir_received' | 'frames_dropped' | 'stat_time_delta'>, Pick<Partial<CallStatReport>, 'rtt' | 'jitter_video' | 'jitter_audio' | 'interframe_delay_variance' | 'freeze_count' | 'total_freezes_duration' | 'ss_freeze_count' | 'ss_total_freezes_duration' | 'inserted_audio_samples_for_deceleration' | 'removed_audio_samples_for_acceleration' | 'concealed_audio_samples' | 'total_audio_energy' | 'local_address' | 'local_connection_type' | 'network_type' | 'transport' | 'remote_address' | 'remote_connection_type'> {
|
|
39
40
|
concealed_silent_audio_samples?: number;
|
|
40
41
|
concealment_audio_avg_size?: number;
|
|
41
42
|
[k: string]: string | number | undefined;
|
|
@@ -22,6 +22,7 @@ import { ParticipantStreamDescription } from './ParticipantStreamDescription';
|
|
|
22
22
|
import { IRoomId } from './Room';
|
|
23
23
|
import VideoSettings from './VideoSettings';
|
|
24
24
|
import { ChatRoom } from './WaitingHall';
|
|
25
|
+
type SignalingMessage = Record<string, any>;
|
|
25
26
|
export type RecordInfo = {
|
|
26
27
|
initiator: ParticipantId;
|
|
27
28
|
recordMovieId: number;
|
|
@@ -58,9 +59,6 @@ declare namespace SignalingMessage {
|
|
|
58
59
|
rtpTimestamp: number | null;
|
|
59
60
|
sequenceNumber: number;
|
|
60
61
|
fastScreenShare: boolean;
|
|
61
|
-
};
|
|
62
|
-
export type ParticipantSuspendInfo = {
|
|
63
|
-
participantStreamDescription: ParticipantStreamDescription | null;
|
|
64
62
|
suspend: boolean;
|
|
65
63
|
};
|
|
66
64
|
export interface Participant {
|
|
@@ -71,6 +69,7 @@ declare namespace SignalingMessage {
|
|
|
71
69
|
state: ParticipantState;
|
|
72
70
|
responders?: OkUserId[];
|
|
73
71
|
responderTypes?: UserType[];
|
|
72
|
+
responderDeviceIdxs?: number[];
|
|
74
73
|
permissions?: string[];
|
|
75
74
|
mediaSettings: Partial<MediaSettings>;
|
|
76
75
|
participantState?: {
|
|
@@ -136,7 +135,7 @@ declare namespace SignalingMessage {
|
|
|
136
135
|
peerId: PeerId;
|
|
137
136
|
data: {
|
|
138
137
|
candidate?: RTCIceCandidateInit;
|
|
139
|
-
sdp?: RTCSessionDescriptionInit
|
|
138
|
+
sdp?: Required<RTCSessionDescriptionInit>;
|
|
140
139
|
};
|
|
141
140
|
}
|
|
142
141
|
export interface RegisteredPeer extends Notification {
|
|
@@ -387,9 +386,6 @@ declare namespace SignalingMessage {
|
|
|
387
386
|
export interface ParticipantSourcesUpdateNotification extends Notification {
|
|
388
387
|
participantUpdateInfos: ParticipantUpdateInfo[];
|
|
389
388
|
}
|
|
390
|
-
export interface ParticipantSourcesSuspendNotification extends Notification {
|
|
391
|
-
participantSuspendInfos: ParticipantSuspendInfo[];
|
|
392
|
-
}
|
|
393
389
|
export {};
|
|
394
390
|
}
|
|
395
391
|
export default SignalingMessage;
|
package/types/Statistics.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export type StatTransport = {
|
|
|
6
6
|
bytesReceived: number;
|
|
7
7
|
local?: ILocalIceCandidateStat;
|
|
8
8
|
remote?: IRemoteIceCandidateStat;
|
|
9
|
+
averageNetStat?: AverageNetStat;
|
|
10
|
+
};
|
|
11
|
+
export type AverageNetStat = {
|
|
12
|
+
currentRoundTripTime: number;
|
|
13
|
+
lostPercent: number;
|
|
9
14
|
};
|
|
10
15
|
export interface IRemoteIceCandidateStat {
|
|
11
16
|
type: RTCIceCandidateType;
|
|
@@ -59,6 +64,7 @@ export type StatItem = {
|
|
|
59
64
|
timestamp: number;
|
|
60
65
|
transport: StatTransport;
|
|
61
66
|
rtps: StatRtp[];
|
|
67
|
+
remoteRtps?: StatRtp[];
|
|
62
68
|
};
|
|
63
69
|
export type StatResult = {
|
|
64
70
|
inbound: {
|
package/types/VideoSettings.d.ts
CHANGED
|
@@ -20,6 +20,21 @@ export type VideoSettings = {
|
|
|
20
20
|
* https://www.w3.org/TR/mst-content-hint/#dom-rtcdegradationpreference
|
|
21
21
|
*/
|
|
22
22
|
degradationPreference: string;
|
|
23
|
+
/**
|
|
24
|
+
* Настройка временных слоев
|
|
25
|
+
* https://www.w3.org/TR/webrtc-svc/
|
|
26
|
+
*/
|
|
27
|
+
scalabilityMode: string;
|
|
23
28
|
};
|
|
24
29
|
export default VideoSettings;
|
|
25
30
|
export declare function compareVideoSettings(vs1: VideoSettings | null, vs2: VideoSettings | null): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Настройки временных слоев для режима масштабируемости
|
|
33
|
+
* https://www.w3.org/TR/webrtc-svc/#scalabilitymodes*
|
|
34
|
+
* 1, 2 и 3 слоя, чем хуже качество сети, тем больше нужно
|
|
35
|
+
*/
|
|
36
|
+
export declare enum VideoScalability {
|
|
37
|
+
L1T1 = "L1T1",
|
|
38
|
+
L1T2 = "L1T2",
|
|
39
|
+
L1T3 = "L1T3"
|
|
40
|
+
}
|