@vkontakte/calls-sdk 2.8.12-dev.c0dd153e.0 → 2.8.12-dev.c58bce06.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/CallsSDK.d.ts +40 -7
- package/abstract/BaseApi.d.ts +15 -9
- package/abstract/BaseSignaling.d.ts +10 -5
- package/calls-sdk.cjs.js +7 -13
- package/calls-sdk.esm.js +4521 -2972
- package/classes/AudioFix.d.ts +2 -2
- package/classes/AudioOutput.d.ts +6 -3
- package/classes/CallRegistry.d.ts +5 -1
- package/classes/ExternalIdCache.d.ts +1 -0
- package/classes/MediaSource.d.ts +6 -2
- package/classes/SpecListener.d.ts +2 -2
- package/classes/codec/LibVPxDecoder.d.ts +2 -2
- package/classes/codec/LibVPxEncoder.d.ts +2 -2
- package/classes/codec/WebCodecsDecoder.d.ts +2 -2
- package/classes/codec/WebCodecsEncoder.d.ts +2 -2
- package/classes/codec/WorkerBase.d.ts +3 -3
- package/classes/{Conversation.d.ts → conversation/Conversation.d.ts} +61 -48
- package/classes/conversation/Conversation.testUtils.d.ts +148 -0
- package/classes/{ConversationResponseValidator.d.ts → conversation/ConversationResponseValidator.d.ts} +1 -1
- package/classes/{DisplayLayoutRequester.d.ts → conversation/DisplayLayoutRequester.d.ts} +5 -5
- package/classes/conversation/index.d.ts +1 -0
- package/classes/screenshare/ScreenCaptureReceiver.d.ts +2 -2
- package/classes/screenshare/ScreenCaptureSender.d.ts +2 -2
- package/classes/screenshare/StreamBuilder.d.ts +2 -2
- package/classes/stat/CallFinishClassifier.d.ts +11 -0
- package/classes/stat/CallLifecycleStats.d.ts +42 -0
- package/classes/stat/CodecStatsAggregator.d.ts +2 -2
- package/classes/stat/ConversationStats.d.ts +24 -8
- package/classes/stat/FirstMediaSentProbe.d.ts +13 -0
- package/classes/stat/StatAggregator.d.ts +6 -2
- package/classes/stat/StatClock.d.ts +35 -0
- package/classes/stat/StatDrainScheduler.d.ts +121 -0
- package/classes/stat/StatEventCollector.d.ts +54 -0
- package/classes/stat/StatPings.d.ts +3 -4
- package/classes/stat/StatQueue.d.ts +92 -0
- package/classes/stat/StatSignalingCommands.d.ts +3 -4
- package/classes/stat/StatUnloadJournal.d.ts +39 -0
- package/classes/transport/BaseTransport.d.ts +7 -1
- package/classes/transport/DirectTransport.d.ts +3 -2
- package/classes/transport/PerfStatReporter.d.ts +2 -0
- package/classes/transport/ServerTransport.d.ts +3 -6
- package/classes/transport/SimulcastSender.d.ts +31 -0
- package/classes/transport/Transport.d.ts +10 -2
- package/default/Api.d.ts +29 -5
- package/default/ApiExternal.d.ts +2 -1
- package/default/Signaling.d.ts +13 -15
- package/default/SignalingTransport.d.ts +7 -1
- package/enums/ClientHangupReason.d.ts +7 -0
- package/enums/HangupType.d.ts +0 -1
- package/enums/SessionError.d.ts +15 -0
- package/enums/Stat.d.ts +5 -1
- package/package.json +3 -3
- package/static/ApiTransport.d.ts +7 -0
- package/static/AuthData.d.ts +10 -0
- package/static/Debug.d.ts +1 -0
- package/static/External.d.ts +1 -1
- package/static/Params.d.ts +42 -2
- package/static/ParticipantConnectionStatusUtils.d.ts +1 -0
- package/static/Sdp.d.ts +3 -0
- package/static/SessionStore.d.ts +38 -0
- package/static/SignalingCapabilities.d.ts +1 -1
- package/static/SimulcastInfo.d.ts +5 -3
- package/static/Utils.d.ts +1 -2
- package/static/WebRTCUtils.d.ts +13 -12
- package/types/Api.d.ts +9 -0
- package/types/Capabilities.d.ts +1 -0
- package/types/Conversation.d.ts +12 -2
- package/types/FastHangup.d.ts +66 -0
- package/types/Participant.d.ts +1 -0
- package/types/PerfStatReporter.d.ts +0 -4
- package/types/SignalingCommand.d.ts +2 -0
- package/types/SignalingMessage.d.ts +5 -1
- package/utils/IceServers.d.ts +2 -0
- package/utils/NavigatorPermissions.d.ts +2 -2
- package/utils/SerializeLatest.d.ts +5 -0
- package/classes/StatsLogger.d.ts +0 -26
package/classes/AudioFix.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DebugLogger } from '../static/Debug';
|
|
2
|
-
import
|
|
2
|
+
import StatEventCollector from './stat/StatEventCollector';
|
|
3
3
|
import { MediaSource } from './MediaSource';
|
|
4
4
|
export default class AudioFix {
|
|
5
5
|
private _fixNoPacketsApplied;
|
|
@@ -15,7 +15,7 @@ export default class AudioFix {
|
|
|
15
15
|
private _lastPacketsSentTime;
|
|
16
16
|
private _toggleAudioPromise;
|
|
17
17
|
private _fixNoPacketsAppliedVideo;
|
|
18
|
-
constructor(mediaSource: MediaSource, debug?: DebugLogger, logger?:
|
|
18
|
+
constructor(mediaSource: MediaSource, debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
19
19
|
private _fixAudioDeviceNoPackets;
|
|
20
20
|
private _fixAudioDeviceTooManyPackets;
|
|
21
21
|
fix(rtps: any[]): void;
|
package/classes/AudioOutput.d.ts
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { type DebugLogger } from '../static/Debug';
|
|
2
2
|
import { ParticipantId } from '../types/Participant';
|
|
3
|
-
import
|
|
3
|
+
import StatEventCollector from './stat/StatEventCollector';
|
|
4
4
|
import { StatFirstMediaReceived } from './stat/StatFirstMediaReceived';
|
|
5
5
|
/**
|
|
6
6
|
* Единый AudioOutput поддерживающий p2p, audioMix и transparent-audio
|
|
7
7
|
*/
|
|
8
8
|
export default class AudioOutput {
|
|
9
9
|
protected _audioElement: HTMLAudioElement | null;
|
|
10
|
+
protected readonly _debug: DebugLogger;
|
|
11
|
+
private readonly _preparedAudioElement;
|
|
10
12
|
private _audioTracks;
|
|
11
13
|
private readonly _allowMultipleTracks;
|
|
12
14
|
private _volume;
|
|
13
15
|
private readonly _features;
|
|
14
16
|
private readonly _statFirstMediaReceived;
|
|
15
|
-
protected readonly _debug: DebugLogger;
|
|
16
17
|
private readonly _logger;
|
|
17
|
-
constructor(statFirstMediaReceived: StatFirstMediaReceived, allowMultipleTracks?: boolean, debug?: DebugLogger, logger?:
|
|
18
|
+
constructor(statFirstMediaReceived: StatFirstMediaReceived, allowMultipleTracks?: boolean, debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
18
19
|
add(participantId: ParticipantId, track: MediaStreamTrack): void;
|
|
19
20
|
remove(participantId: ParticipantId, track: MediaStreamTrack): void;
|
|
20
21
|
get volume(): number;
|
|
@@ -25,6 +26,8 @@ export default class AudioOutput {
|
|
|
25
26
|
protected _getTracks(): MediaStreamTrack[];
|
|
26
27
|
protected _initAudioElement(): void;
|
|
27
28
|
protected _stopAudioElement(): void;
|
|
29
|
+
private _createAudioElement;
|
|
30
|
+
private _prepareAudioElement;
|
|
28
31
|
private _addTrackToAudioElement;
|
|
29
32
|
private _removeTrackFromAudioElement;
|
|
30
33
|
private _clearTracks;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Conversation from './
|
|
1
|
+
import type Conversation from './conversation';
|
|
2
2
|
import MediaSettings from '../types/MediaSettings';
|
|
3
3
|
export interface HoldableConversation extends Conversation {
|
|
4
4
|
id: string;
|
|
@@ -6,8 +6,11 @@ export interface HoldableConversation extends Conversation {
|
|
|
6
6
|
}
|
|
7
7
|
export declare class CallRegistry {
|
|
8
8
|
private _conversations;
|
|
9
|
+
private _reserved;
|
|
9
10
|
private _activeId;
|
|
10
11
|
private _mutex;
|
|
12
|
+
private _pendingRemovals;
|
|
13
|
+
reserve(id: string): void;
|
|
11
14
|
add(conversation: HoldableConversation): void;
|
|
12
15
|
remove(id: string | null): void;
|
|
13
16
|
get(id: string): HoldableConversation | undefined;
|
|
@@ -21,6 +24,7 @@ export declare class CallRegistry {
|
|
|
21
24
|
setHold(id: string): Promise<void>;
|
|
22
25
|
switchCall(id: string): Promise<void>;
|
|
23
26
|
clear(): void;
|
|
27
|
+
private _flushPendingRemovals;
|
|
24
28
|
}
|
|
25
29
|
declare const callRegistry: CallRegistry;
|
|
26
30
|
export { callRegistry };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExternalId, ExternalParticipantId } from '../types/ExternalId';
|
|
2
2
|
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
3
3
|
export declare class ExternalIdCache {
|
|
4
|
+
private static _normalizeType;
|
|
4
5
|
private _okIdToExternalId;
|
|
5
6
|
private _externalIdToOkId;
|
|
6
7
|
private _decorativeIdToInitialId;
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import MediaOption from '../enums/MediaOption';
|
|
|
4
4
|
import { type DebugLogger } from '../static/Debug';
|
|
5
5
|
import MediaSettings, { IVideoDimentions } from '../types/MediaSettings';
|
|
6
6
|
import { ScreenCaptureSettings } from '../types/ScreenCaptureSettings';
|
|
7
|
-
import
|
|
7
|
+
import StatEventCollector from './stat/StatEventCollector';
|
|
8
8
|
export declare const enum MediaSourceEvent {
|
|
9
9
|
SOURCE_CHANGED = "SOURCE_CHANGED",
|
|
10
10
|
SOURCE_READY = "SOURCE_READY",
|
|
@@ -58,7 +58,9 @@ export declare class MediaSource extends EventEmitter {
|
|
|
58
58
|
private readonly _videoEffectsFpsLimiter?;
|
|
59
59
|
private readonly _debug;
|
|
60
60
|
private readonly _logger;
|
|
61
|
-
|
|
61
|
+
private _cameraTrackSetAt;
|
|
62
|
+
private _cameraMuteRecoveredAt;
|
|
63
|
+
constructor(debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
62
64
|
get cameraVideoTrack(): MediaStreamTrack | null;
|
|
63
65
|
set cameraVideoTrack(track: MediaStreamTrack | null);
|
|
64
66
|
request(mediaOptions?: MediaOption[], needEmptyTracks?: boolean): Promise<void>;
|
|
@@ -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;
|
|
@@ -2,7 +2,7 @@ import { type DebugLogger } from '../static/Debug';
|
|
|
2
2
|
import MediaSettings from '../types/MediaSettings';
|
|
3
3
|
import { Participant, ParticipantId } from '../types/Participant';
|
|
4
4
|
import EventEmitter from './EventEmitter';
|
|
5
|
-
import
|
|
5
|
+
import StatEventCollector from './stat/StatEventCollector';
|
|
6
6
|
import { Transport } from './transport/Transport';
|
|
7
7
|
import { VolumesDetector } from './VolumesDetector';
|
|
8
8
|
export default class SpecListener extends EventEmitter {
|
|
@@ -14,7 +14,7 @@ export default class SpecListener extends EventEmitter {
|
|
|
14
14
|
private _connectionTimeout;
|
|
15
15
|
private _connectionTimeoutSuppressed;
|
|
16
16
|
private _volumeTimeout;
|
|
17
|
-
constructor(transport: Transport, volumesDetector: VolumesDetector, participants: Record<ParticipantId, Participant>, debug?: DebugLogger, logger?:
|
|
17
|
+
constructor(transport: Transport, volumesDetector: VolumesDetector, participants: Record<ParticipantId, Participant>, debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
18
18
|
destroy(): void;
|
|
19
19
|
onChangeRemoteMediaSettings(participantId: ParticipantId, mediaSettings: MediaSettings): void;
|
|
20
20
|
onParticipantHoldChanged(): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type DebugLogger } from '../../static/Debug';
|
|
2
|
-
import
|
|
2
|
+
import StatEventCollector from '../stat/StatEventCollector';
|
|
3
3
|
import IDecoder from './IDecoder';
|
|
4
4
|
import WorkerBase from './WorkerBase';
|
|
5
5
|
export default class LibVPxDecoder extends WorkerBase implements IDecoder {
|
|
6
|
-
constructor(debug?: DebugLogger, logger?:
|
|
6
|
+
constructor(debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
7
7
|
init(onFrameImage: (image: ImageData) => void, onFrameError: (error: unknown) => void, onKeyFrameRequested: () => void): Promise<void>;
|
|
8
8
|
decodeFrame(timestamp: number, data: Uint8Array, isVP9: boolean, keyFrame?: boolean): void;
|
|
9
9
|
destroy(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DebugLogger } from '../../static/Debug';
|
|
2
|
-
import
|
|
2
|
+
import StatEventCollector from '../stat/StatEventCollector';
|
|
3
3
|
import IEncoder from './IEncoder';
|
|
4
4
|
import { OnFrameCallback } from './Types';
|
|
5
5
|
import WorkerBase from './WorkerBase';
|
|
@@ -15,7 +15,7 @@ export default class LibVPxEncoder extends WorkerBase implements IEncoder {
|
|
|
15
15
|
private _canvasCtx;
|
|
16
16
|
private _frameReadTimeout;
|
|
17
17
|
private _lastFrame;
|
|
18
|
-
constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback, useCongestionControl: boolean, maxBitrate: number, debug?: DebugLogger, logger?:
|
|
18
|
+
constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback, useCongestionControl: boolean, maxBitrate: number, debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
19
19
|
private _createDom;
|
|
20
20
|
private _removeDom;
|
|
21
21
|
private _createStream;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type DebugLogger } from '../../static/Debug';
|
|
2
|
-
import
|
|
2
|
+
import StatEventCollector from '../stat/StatEventCollector';
|
|
3
3
|
import IDecoder from './IDecoder';
|
|
4
4
|
import WorkerBase from './WorkerBase';
|
|
5
5
|
export default class WebCodecsDecoder extends WorkerBase implements IDecoder {
|
|
6
|
-
constructor(debug?: DebugLogger, logger?:
|
|
6
|
+
constructor(debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
7
7
|
init(onFrameImage: (frame: VideoFrame) => void, onFrameError: (error: unknown) => void, onKeyFrameRequested: () => void): Promise<void>;
|
|
8
8
|
decodeFrame(timestamp: number, data: Uint8Array, isVP9: boolean, keyFrame?: boolean): void;
|
|
9
9
|
destroy(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DebugLogger } from '../../static/Debug';
|
|
2
|
-
import
|
|
2
|
+
import StatEventCollector from '../stat/StatEventCollector';
|
|
3
3
|
import IEncoder from './IEncoder';
|
|
4
4
|
import { OnFrameCallback } from './Types';
|
|
5
5
|
import WorkerBase from './WorkerBase';
|
|
@@ -11,7 +11,7 @@ export default class WebCodecsEncoder extends WorkerBase implements IEncoder {
|
|
|
11
11
|
private readonly _maxBitrate;
|
|
12
12
|
private readonly _useCbr;
|
|
13
13
|
private readonly _frameRate;
|
|
14
|
-
constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback, useCongestionControl: boolean, maxBitrate: number, useCbr: boolean, frameRate: number, debug?: DebugLogger, logger?:
|
|
14
|
+
constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback, useCongestionControl: boolean, maxBitrate: number, useCbr: boolean, frameRate: number, debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
15
15
|
init(): Promise<void>;
|
|
16
16
|
requestFrame(keyFrame?: boolean): void;
|
|
17
17
|
setBitrate(bitrate: number, useCbr: boolean, fps: number): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type DebugLogger } from '../../static/Debug';
|
|
2
|
-
import
|
|
2
|
+
import StatEventCollector from '../stat/StatEventCollector';
|
|
3
3
|
export default abstract class WorkerBase {
|
|
4
4
|
protected _worker: Worker | null;
|
|
5
5
|
protected readonly _debug: DebugLogger;
|
|
6
|
-
protected readonly _logger:
|
|
7
|
-
protected constructor(debug?: DebugLogger, logger?:
|
|
6
|
+
protected readonly _logger: StatEventCollector | null;
|
|
7
|
+
protected constructor(debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
8
8
|
protected _createWorker(workerFunctionData: string, onFrame: (data: any) => void, workerArgs?: any[], initArgs?: {
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
}, transfer?: any[]): Promise<void>;
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import type { IEffect } from '@vkontakte/calls-video-effects';
|
|
2
2
|
import type { RGBTuple } from '@vkontakte/calls-vmoji';
|
|
3
|
-
import BaseApi from '
|
|
4
|
-
import BaseLogger from '
|
|
5
|
-
import { AddParticipantParams } from '
|
|
6
|
-
import ConversationFeature from '
|
|
7
|
-
import ConversationOption from '
|
|
8
|
-
import MediaOption from '
|
|
9
|
-
import UpdateDisplayLayoutErrorReason from '
|
|
10
|
-
import UserRole from '
|
|
11
|
-
import UserType from '
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
3
|
+
import BaseApi from '../../abstract/BaseApi';
|
|
4
|
+
import BaseLogger from '../../abstract/BaseLogger';
|
|
5
|
+
import { AddParticipantParams } from '../../abstract/BaseSignaling';
|
|
6
|
+
import ConversationFeature from '../../enums/ConversationFeature';
|
|
7
|
+
import ConversationOption from '../../enums/ConversationOption';
|
|
8
|
+
import MediaOption from '../../enums/MediaOption';
|
|
9
|
+
import UpdateDisplayLayoutErrorReason from '../../enums/UpdateDisplayLayoutErrorReason';
|
|
10
|
+
import UserRole from '../../enums/UserRole';
|
|
11
|
+
import UserType from '../../enums/UserType';
|
|
12
|
+
import { DebugMessageType } from '../../static/Debug';
|
|
13
|
+
import { JSONObject } from '../../static/Json';
|
|
14
|
+
import { IAsrStartParams, IAsrStopParams } from '../../types/Asr';
|
|
15
|
+
import { AudienceModeHandsResponse } from '../../types/AudienceMode';
|
|
16
|
+
import { ConversationData, ConversationOnJoinParams, ConversationOnStartParams } from '../../types/Conversation';
|
|
17
|
+
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk } from '../../types/ExternalId';
|
|
18
|
+
import type { FastHangupHandler, HangupParams } from '../../types/FastHangup';
|
|
19
|
+
import MediaModifiers from '../../types/MediaModifiers';
|
|
20
|
+
import MediaSettings, { IVideoDimentions } from '../../types/MediaSettings';
|
|
21
|
+
import { IAddMovieParams, IUpdateMovieData } from '../../types/MovieShare';
|
|
22
|
+
import MuteStates from '../../types/MuteStates';
|
|
23
|
+
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId, ParticipantStateData } from '../../types/Participant';
|
|
24
|
+
import { DisplayLayoutRequest, ParticipantLayout } from '../../types/ParticipantLayout';
|
|
25
|
+
import { ParticipantListChunkParameters } from '../../types/ParticipantListChunk';
|
|
26
|
+
import ParticipantPriority from '../../types/ParticipantPriority';
|
|
27
|
+
import { ParticipantStreamDescription } from '../../types/ParticipantStreamDescription';
|
|
28
|
+
import { ScreenCaptureSettings } from '../../types/ScreenCaptureSettings';
|
|
29
|
+
import SignalingMessage from '../../types/SignalingMessage';
|
|
30
|
+
import { WaitingHallResponse } from '../../types/WaitingHall';
|
|
31
|
+
import EventEmitter from '../EventEmitter';
|
|
31
32
|
export default class Conversation extends EventEmitter {
|
|
32
33
|
private readonly _api;
|
|
33
34
|
private readonly _signaling;
|
|
@@ -42,7 +43,6 @@ export default class Conversation extends EventEmitter {
|
|
|
42
43
|
private _waitingHallHoldPending;
|
|
43
44
|
private _participantState;
|
|
44
45
|
private _participants;
|
|
45
|
-
private _pendingParticipants;
|
|
46
46
|
private _directTransportIsMaster?;
|
|
47
47
|
private _transport;
|
|
48
48
|
private _debugInfo;
|
|
@@ -57,10 +57,15 @@ export default class Conversation extends EventEmitter {
|
|
|
57
57
|
private _serverSettings;
|
|
58
58
|
private _serverTimeOffset;
|
|
59
59
|
private _delayedHangup;
|
|
60
|
+
private _onFastHangup?;
|
|
61
|
+
private _hangupEmitted;
|
|
62
|
+
private _hangupPromise;
|
|
60
63
|
private _abortController;
|
|
61
64
|
private _registeredPeerReceived;
|
|
62
65
|
private _calleeUnavailableTimer;
|
|
66
|
+
private _reservedId;
|
|
63
67
|
private readonly _onUnload;
|
|
68
|
+
private readonly _onRestore;
|
|
64
69
|
private readonly _audioOutput;
|
|
65
70
|
private readonly _stats;
|
|
66
71
|
private _lastStalled;
|
|
@@ -75,29 +80,25 @@ export default class Conversation extends EventEmitter {
|
|
|
75
80
|
private readonly _statFirstMediaReceived;
|
|
76
81
|
constructor(api: BaseApi, externalLogger: BaseLogger | null);
|
|
77
82
|
static current(): Conversation | null;
|
|
78
|
-
static hangupAfterInit(): void;
|
|
83
|
+
static hangupAfterInit(onFastHangup?: FastHangupHandler): void;
|
|
79
84
|
static id(): string | null;
|
|
80
85
|
get id(): string;
|
|
81
86
|
get externalId(): ExternalParticipantId | undefined;
|
|
82
87
|
get mediaSettings(): MediaSettings | undefined;
|
|
83
88
|
get isCallHeld(): boolean;
|
|
84
89
|
static debugSessionId(): string | null;
|
|
90
|
+
static debugMessage(type: DebugMessageType, ...args: any[]): boolean;
|
|
91
|
+
static debugMessageWithContext(type: DebugMessageType, conversationId: string, ...args: any[]): boolean;
|
|
85
92
|
static getSyncedTime(): number;
|
|
86
93
|
get debugSessionId(): string | null;
|
|
94
|
+
getCachedRawOkIdByExternalId(externalId: ExternalId): OkUserId | null;
|
|
95
|
+
private _buildInternalParams;
|
|
87
96
|
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart, conversationId, }: ConversationOnStartParams): Promise<ConversationData>;
|
|
88
|
-
onJoin(joinArgs:
|
|
89
|
-
conversationId?: string;
|
|
90
|
-
mediaOptions: MediaOption[];
|
|
91
|
-
chatId?: string;
|
|
92
|
-
joinLink?: string;
|
|
93
|
-
observedIds?: ExternalUserId[];
|
|
94
|
-
payload?: string;
|
|
95
|
-
onFastJoin?: FastJoinHandler;
|
|
96
|
-
}): Promise<ConversationData>;
|
|
97
|
+
onJoin(joinArgs: ConversationOnJoinParams): Promise<ConversationData>;
|
|
97
98
|
private _onJoinPart2;
|
|
98
99
|
private _extractExternalRooms;
|
|
99
100
|
private _extractExternalRoomsData;
|
|
100
|
-
onPush(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string): Promise<void>;
|
|
101
|
+
onPush(conversationId: string, type?: UserType, peerId?: number, conversationParams?: string, wsEndpoint?: string, userId?: number): Promise<void>;
|
|
101
102
|
private _isInWaitingHall;
|
|
102
103
|
private _isWaitForAdmin;
|
|
103
104
|
private _isRestricted;
|
|
@@ -106,10 +107,9 @@ export default class Conversation extends EventEmitter {
|
|
|
106
107
|
private _acceptConcurrent;
|
|
107
108
|
private _getMainRoomParticipants;
|
|
108
109
|
private _decodeExternalConversationParams;
|
|
109
|
-
private _logCallStartEvent;
|
|
110
110
|
accept(mediaOptions: MediaOption[]): Promise<ConversationData>;
|
|
111
|
-
decline(): Promise<void>;
|
|
112
|
-
hangup(): Promise<void>;
|
|
111
|
+
decline(params?: HangupParams): Promise<void>;
|
|
112
|
+
hangup(params?: HangupParams): Promise<void>;
|
|
113
113
|
addParticipant(participantIds: ExternalId[], params?: AddParticipantParams): Promise<void>;
|
|
114
114
|
addParticipantLegacy(participantIds: CompositeUserId[], params?: AddParticipantParams): Promise<void>;
|
|
115
115
|
removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<void>;
|
|
@@ -117,8 +117,14 @@ export default class Conversation extends EventEmitter {
|
|
|
117
117
|
updateStatisticsInterval(): void;
|
|
118
118
|
private _openTransport;
|
|
119
119
|
private _allocateParticipantTransport;
|
|
120
|
+
private _closeParticipantTransport;
|
|
121
|
+
private _cleanupRegistry;
|
|
122
|
+
private _emitHangupOnce;
|
|
123
|
+
private _sendHangupApi;
|
|
120
124
|
private _close;
|
|
121
|
-
|
|
125
|
+
private _sendHangup;
|
|
126
|
+
destroy(): void;
|
|
127
|
+
private _destroy;
|
|
122
128
|
private _getConversationParams;
|
|
123
129
|
private _setConversationParams;
|
|
124
130
|
private _buildSignalingEndpoint;
|
|
@@ -160,6 +166,7 @@ export default class Conversation extends EventEmitter {
|
|
|
160
166
|
private _getExistedParticipantByIdOrCreate;
|
|
161
167
|
private _getExternalIdByParticipantId;
|
|
162
168
|
private _getExternalIdsByOkIdsFromCache;
|
|
169
|
+
private _getOrCacheExternalIdByCompositeId;
|
|
163
170
|
private _registerParticipantAndSetMarkersIfChunkEnabled;
|
|
164
171
|
private _warnParticipantNotInConversation;
|
|
165
172
|
private _denormalizeMarkers;
|
|
@@ -196,10 +203,13 @@ export default class Conversation extends EventEmitter {
|
|
|
196
203
|
private _cleanupParticipants;
|
|
197
204
|
private _cleanupParticipantAgnosticStreams;
|
|
198
205
|
private _cleanupTransport;
|
|
206
|
+
private _finishLifecycle;
|
|
207
|
+
private _getFirstMediaSentCallback;
|
|
208
|
+
private _stopFirstMediaSentProbe;
|
|
199
209
|
private _cleanupTransportForHold;
|
|
200
210
|
private _cleanupSpeakerDetector;
|
|
201
211
|
private _cleanupSpecListener;
|
|
202
|
-
private
|
|
212
|
+
private _disposeSignaling;
|
|
203
213
|
private _onAddParticipant;
|
|
204
214
|
private _onRemoveParticipant;
|
|
205
215
|
changeDevice(kind: MediaDeviceKind): Promise<void>;
|
|
@@ -217,6 +227,8 @@ export default class Conversation extends EventEmitter {
|
|
|
217
227
|
setAnimojiFill(fill: RGBTuple | string): void;
|
|
218
228
|
setVideoStream(stream: MediaStream, isScreen?: boolean): Promise<void>;
|
|
219
229
|
setAudioStream(stream: MediaStream): Promise<void>;
|
|
230
|
+
private readonly _toggleLocalVideo;
|
|
231
|
+
private readonly _toggleLocalAudio;
|
|
220
232
|
toggleLocalVideo(enabled: boolean): Promise<void>;
|
|
221
233
|
toggleLocalAudio(enabled: boolean): Promise<void>;
|
|
222
234
|
/**
|
|
@@ -232,7 +244,7 @@ export default class Conversation extends EventEmitter {
|
|
|
232
244
|
private _getWaitingForPromotionStatus;
|
|
233
245
|
putHandsDown(): Promise<void>;
|
|
234
246
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
235
|
-
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
247
|
+
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void | SignalingMessage>;
|
|
236
248
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
237
249
|
requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
|
|
238
250
|
feedback(key: string): Promise<SignalingMessage>;
|
|
@@ -361,7 +373,7 @@ export default class Conversation extends EventEmitter {
|
|
|
361
373
|
private _onRecordInfo;
|
|
362
374
|
private _onStopRecordInfo;
|
|
363
375
|
private _changePinnedParticipantForRoom;
|
|
364
|
-
_changeRecordInfoForRoom():
|
|
376
|
+
_changeRecordInfoForRoom(): void;
|
|
365
377
|
private _changeAsrInfoForRoom;
|
|
366
378
|
private _changeUrlSharingInfoForRoom;
|
|
367
379
|
private _onParticipantAnimojiChanged;
|
|
@@ -413,6 +425,8 @@ export default class Conversation extends EventEmitter {
|
|
|
413
425
|
private _toggleJoinAvailability;
|
|
414
426
|
private _updateDisplayLayoutFromCache;
|
|
415
427
|
private _setParticipantsStatus;
|
|
428
|
+
private _setParticipantsStalled;
|
|
429
|
+
private _updateParticipantsStatus;
|
|
416
430
|
private _onJoinLinkChanged;
|
|
417
431
|
private _onRoomsUpdated;
|
|
418
432
|
private _onRoomUpdated;
|
|
@@ -436,7 +450,6 @@ export default class Conversation extends EventEmitter {
|
|
|
436
450
|
private _setMuteStatesForRoomId;
|
|
437
451
|
private _forceOpenTransportForAloneInCall;
|
|
438
452
|
private _registerParticipant;
|
|
439
|
-
private _getParticipants;
|
|
440
453
|
private _getParticipant;
|
|
441
454
|
}
|
|
442
455
|
declare function _resetPendingInstance(): void;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { FetchMock } from 'vitest-fetch-mock';
|
|
2
|
+
import { Mock } from 'vitest';
|
|
3
|
+
import { Client, Server } from 'mock-socket';
|
|
4
|
+
import { ISharedMovieInfo, OkUserId } from '../../CallsSDK';
|
|
5
|
+
import Api from '../../default/Api';
|
|
6
|
+
import CallDirection from '../../enums/CallDirection';
|
|
7
|
+
import ConversationOption from '../../enums/ConversationOption';
|
|
8
|
+
import TransportState from '../../enums/TransportState';
|
|
9
|
+
import TransportTopology from '../../enums/TransportTopology';
|
|
10
|
+
import { ParticipantStatus } from '../../static/External';
|
|
11
|
+
import { ExternalParticipantId } from '../../types/ExternalId';
|
|
12
|
+
import { ParticipantListMarkers } from '../../types/Participant';
|
|
13
|
+
import SignalingMessage from '../../types/SignalingMessage';
|
|
14
|
+
import Conversation from './Conversation';
|
|
15
|
+
declare function createParams(): {
|
|
16
|
+
apiKey: string;
|
|
17
|
+
apiEnv: string;
|
|
18
|
+
onLocalStream: Mock<import("@vitest/spy").Procedure>;
|
|
19
|
+
onLocalStatus: Mock<import("@vitest/spy").Procedure>;
|
|
20
|
+
onConversation: Mock<import("@vitest/spy").Procedure>;
|
|
21
|
+
onLocalSharedMovieInfo: Mock<import("@vitest/spy").Procedure>;
|
|
22
|
+
onRemoteSharedMovieInfo: Mock<import("@vitest/spy").Procedure>;
|
|
23
|
+
onRemoteSharedUrl: Mock<import("@vitest/spy").Procedure>;
|
|
24
|
+
onCallState: Mock<import("@vitest/spy").Procedure>;
|
|
25
|
+
onOptionsChanged: Mock<import("@vitest/spy").Procedure>;
|
|
26
|
+
onPinnedParticipant: Mock<import("@vitest/spy").Procedure>;
|
|
27
|
+
onRemoteMediaSettings: Mock<import("@vitest/spy").Procedure>;
|
|
28
|
+
onRemoteParticipantState: Mock<import("@vitest/spy").Procedure>;
|
|
29
|
+
onLocalPin: Mock<import("@vitest/spy").Procedure>;
|
|
30
|
+
onDebugMessage: Mock<import("@vitest/spy").Procedure>;
|
|
31
|
+
onHangup: Mock<import("@vitest/spy").Procedure>;
|
|
32
|
+
onRemoteRemoved: Mock<import("@vitest/spy").Procedure>;
|
|
33
|
+
onConversationParticipantListChunk: Mock<import("@vitest/spy").Procedure>;
|
|
34
|
+
onRoomParticipantsUpdated: Mock<import("@vitest/spy").Procedure>;
|
|
35
|
+
onChatRoomUpdated: Mock<import("@vitest/spy").Procedure>;
|
|
36
|
+
onRemoteStatus: Mock<import("@vitest/spy").Procedure>;
|
|
37
|
+
onSpeakerChanged: Mock<import("@vitest/spy").Procedure>;
|
|
38
|
+
};
|
|
39
|
+
export type ConversationTestParams = ReturnType<typeof createParams>;
|
|
40
|
+
export type ConversationTestTools = {
|
|
41
|
+
readonly endpointURL: string;
|
|
42
|
+
readonly fetchMocker: FetchMock;
|
|
43
|
+
readonly params: ConversationTestParams;
|
|
44
|
+
readonly server: Server;
|
|
45
|
+
readonly wsBaseURL: string;
|
|
46
|
+
createConnectionMessage(data?: Partial<SignalingMessage.Connection>): SignalingMessage.Connection;
|
|
47
|
+
createConversation(options?: {
|
|
48
|
+
api?: Api;
|
|
49
|
+
}): Conversation;
|
|
50
|
+
createExternalIdMock(id: string, data?: Partial<ExternalParticipantId>): ExternalParticipantId;
|
|
51
|
+
createMarkers(data?: Partial<ParticipantListMarkers>): ParticipantListMarkers;
|
|
52
|
+
createMovieShareInfo(initiatorId: string, data?: Partial<ISharedMovieInfo> | null): ISharedMovieInfo;
|
|
53
|
+
createParticipant(id: number, data?: Partial<SignalingMessage.Participant>): SignalingMessage.Participant & Required<Pick<SignalingMessage.Participant, 'markers'>>;
|
|
54
|
+
createParticipantWithMarkers(id: number, data?: Partial<SignalingMessage.Participant>): SignalingMessage.Participant & Required<Pick<SignalingMessage.Participant, 'markers'>>;
|
|
55
|
+
createPromoteParticipantMessage(): SignalingMessage.PromoteParticipant;
|
|
56
|
+
createSignallingConversation(okUserId: OkUserId, peerId: SignalingMessage.PeerId, data?: Partial<SignalingMessage.Conversation>): SignalingMessage.Conversation;
|
|
57
|
+
createWaitingHallConversationData(): ReturnType<typeof createWaitingHallConversationData>;
|
|
58
|
+
emitMessageOnConnection(wsServer: Server, message?: SignalingMessage.Connection): void;
|
|
59
|
+
enableParticipantListChunk(): void;
|
|
60
|
+
expectRemoteStatus(status: ParticipantStatus, participantId?: string): Promise<void>;
|
|
61
|
+
expectRemoteStatusCall(status: ParticipantStatus, participantId?: string): void;
|
|
62
|
+
forgetConversation(conversation: Conversation): void;
|
|
63
|
+
getActiveSocket(wsServer: Server): Client;
|
|
64
|
+
hasRemoteStatusCall(status: ParticipantStatus, participantId?: string): boolean;
|
|
65
|
+
isCapabilityEnabled(predicateIndex: number, wsServer: Server): boolean;
|
|
66
|
+
parseUrlSearch(search: string): Record<string, string>;
|
|
67
|
+
resetRemoteStatusCallbacks(): void;
|
|
68
|
+
respondOnGetParticipantListChunkWith(data: Partial<SignalingMessage.ParticipantListChunk>): void;
|
|
69
|
+
sendAcceptedCall(participant: SignalingMessage.Participant): void;
|
|
70
|
+
sendHungup(participant: SignalingMessage.Participant): void;
|
|
71
|
+
sendSessionState(participant: SignalingMessage.Participant | number, connected: boolean, data?: Partial<SignalingMessage.SessionState>): void;
|
|
72
|
+
setApiAuth(data?: {
|
|
73
|
+
sessionKey?: string;
|
|
74
|
+
sessionSecretKey?: string;
|
|
75
|
+
}): void;
|
|
76
|
+
setTransportState(conversation: Conversation, state: TransportState): void;
|
|
77
|
+
socketRespondWith(socket: Client, command: string, response: SignalingMessage): void;
|
|
78
|
+
socketSendNotification(socket: Client, notification: string, response?: SignalingMessage): void;
|
|
79
|
+
startConversation(message?: SignalingMessage.Connection): Promise<Conversation>;
|
|
80
|
+
startConversationWithParticipants(participants: SignalingMessage.Participant[], peerId?: SignalingMessage.PeerId): Promise<Conversation>;
|
|
81
|
+
startConversationWithRemoteParticipant(remoteParticipantData?: Partial<SignalingMessage.Participant>): Promise<{
|
|
82
|
+
conversation: Conversation;
|
|
83
|
+
meParticipant: SignalingMessage.Participant;
|
|
84
|
+
remoteParticipant: SignalingMessage.Participant;
|
|
85
|
+
}>;
|
|
86
|
+
stubApiRequest(endpoint: string, method: string, data: object): void;
|
|
87
|
+
waitFor(fn: () => Promise<boolean> | boolean, message?: string, timeout?: number): Promise<true>;
|
|
88
|
+
flushSdkCallbacks(): Promise<null>;
|
|
89
|
+
};
|
|
90
|
+
export declare function defineConversationTests(name: string, defineTests: (tools: ConversationTestTools) => void): void;
|
|
91
|
+
export declare function createExternalIdMock(id: string, data?: Partial<ExternalParticipantId>): ExternalParticipantId;
|
|
92
|
+
export declare function enableParticipantListChunk(): void;
|
|
93
|
+
export declare function setApiAuth(data?: {
|
|
94
|
+
sessionKey?: string;
|
|
95
|
+
sessionSecretKey?: string;
|
|
96
|
+
}): void;
|
|
97
|
+
export declare function setTransportState(conversation: Conversation, state: TransportState): void;
|
|
98
|
+
export declare function socketRespondWith(socket: Client, command: string, response: SignalingMessage): void;
|
|
99
|
+
export declare function socketSendNotification(socket: Client, notification: string, response?: SignalingMessage): void;
|
|
100
|
+
export declare function createWaitingHallConversationData(): {
|
|
101
|
+
acceptTime: null;
|
|
102
|
+
asrInfo: null;
|
|
103
|
+
asrInfoByRoom: Map<any, any>;
|
|
104
|
+
audienceMode: boolean;
|
|
105
|
+
chatId: null;
|
|
106
|
+
compositeUserId: string;
|
|
107
|
+
concurrent: boolean;
|
|
108
|
+
direction: CallDirection;
|
|
109
|
+
externalId: ExternalParticipantId;
|
|
110
|
+
features: never[];
|
|
111
|
+
featuresPerRole: null;
|
|
112
|
+
id: string;
|
|
113
|
+
mediaModifiers: {
|
|
114
|
+
denoise: boolean;
|
|
115
|
+
denoiseAnn: boolean;
|
|
116
|
+
};
|
|
117
|
+
muteStates: Map<any, any>;
|
|
118
|
+
muteStatesPersonal: {};
|
|
119
|
+
needRate: boolean;
|
|
120
|
+
networkRating: number;
|
|
121
|
+
observer: boolean;
|
|
122
|
+
options: ConversationOption[];
|
|
123
|
+
participantsLimit: number;
|
|
124
|
+
pinnedParticipantIdByRoom: Map<any, any>;
|
|
125
|
+
recordsInfoByRoom: Map<any, any>;
|
|
126
|
+
restricted: boolean;
|
|
127
|
+
roles: never[];
|
|
128
|
+
roomId: number | null;
|
|
129
|
+
topology: TransportTopology;
|
|
130
|
+
urlSharingInfoByRoom: Map<any, any>;
|
|
131
|
+
userId: number;
|
|
132
|
+
waitForAdmin: boolean;
|
|
133
|
+
waitingHall: boolean;
|
|
134
|
+
};
|
|
135
|
+
export declare function createPromoteParticipantMessage(): SignalingMessage.PromoteParticipant;
|
|
136
|
+
export declare function emitMessageOnConnection(wsServer: Server, message?: SignalingMessage.Connection): void;
|
|
137
|
+
export declare function getActiveSocket(wsServer: Server): Client;
|
|
138
|
+
export declare function isCapabilityEnabled(predicateIndex: number, wsServer: Server): boolean;
|
|
139
|
+
export declare function parseUrlSearch(search: string): Record<string, string>;
|
|
140
|
+
export declare function flushSdkCallbacks(): Promise<null>;
|
|
141
|
+
export declare function waitFor(fn: () => Promise<boolean> | boolean, message?: string, timeout?: number): Promise<true>;
|
|
142
|
+
export declare function createSignallingConversation(okUserId: OkUserId, peerId: SignalingMessage.PeerId, data?: Partial<SignalingMessage.Conversation>): SignalingMessage.Conversation;
|
|
143
|
+
export declare function createConnectionMessage(data?: Partial<SignalingMessage.Connection>): SignalingMessage.Connection;
|
|
144
|
+
export declare function createParticipant(id: number, data?: Partial<SignalingMessage.Participant>): SignalingMessage.Participant & Required<Pick<SignalingMessage.Participant, 'markers'>>;
|
|
145
|
+
export declare function createParticipantWithMarkers(id: number, data?: Partial<SignalingMessage.Participant>): SignalingMessage.Participant & Required<Pick<SignalingMessage.Participant, 'markers'>>;
|
|
146
|
+
export declare function createMarkers(data?: Partial<ParticipantListMarkers>): ParticipantListMarkers;
|
|
147
|
+
export declare function createMovieShareInfo(initiatorId: string, data?: Partial<ISharedMovieInfo> | null): ISharedMovieInfo;
|
|
148
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import ConversationResponse from '
|
|
1
|
+
import ConversationResponse from '../../types/ConversationResponse';
|
|
2
2
|
export type ConversationResponseSource = 'startConversation' | 'joinConversation' | 'joinConversationByLink' | 'fastStart' | 'fastJoin';
|
|
3
3
|
export declare function assertValidConversationResponse(response: ConversationResponse | null | undefined, source: ConversationResponseSource): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import BaseApi from '
|
|
2
|
-
import type { DebugLogger } from '
|
|
3
|
-
import { DisplayLayoutRequest, ParticipantLayout } from '
|
|
4
|
-
import { Participant, ParticipantId } from '
|
|
1
|
+
import BaseApi from '../../abstract/BaseApi';
|
|
2
|
+
import type { DebugLogger } from '../../static/Debug';
|
|
3
|
+
import { DisplayLayoutRequest, ParticipantLayout } from '../../types/ParticipantLayout';
|
|
4
|
+
import { Participant, ParticipantId } from '../../types/Participant';
|
|
5
5
|
type DisplayLayoutRequesterParams = {
|
|
6
6
|
api: BaseApi;
|
|
7
7
|
debug: DebugLogger;
|
|
8
|
-
getParticipants: () =>
|
|
8
|
+
getParticipants: () => Record<ParticipantId, Participant>;
|
|
9
9
|
isMe: (participantId: ParticipantId) => boolean;
|
|
10
10
|
updateDisplayLayout: (layouts: ParticipantLayout[]) => Promise<void>;
|
|
11
11
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Conversation';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DebugLogger } from '../../static/Debug';
|
|
2
2
|
import { ParticipantId } from '../../types/Participant';
|
|
3
|
-
import
|
|
3
|
+
import StatEventCollector from '../stat/StatEventCollector';
|
|
4
4
|
import { ParticipantIdRegistry } from '../ParticipantIdRegistry';
|
|
5
5
|
import { StatAggregator } from '../stat/StatAggregator';
|
|
6
6
|
import { IOnStat } from './BaseStreamBuilder';
|
|
@@ -14,7 +14,7 @@ export default class ScreenCaptureReceiver {
|
|
|
14
14
|
private readonly _debug;
|
|
15
15
|
private readonly _logger;
|
|
16
16
|
private readonly _statAggregator;
|
|
17
|
-
constructor(datachannel: RTCDataChannel, participantIdRegistry: ParticipantIdRegistry, onStream: (streamId: string, stream: MediaStream) => void, onEos: (streamId: string) => void, onStat: IOnStat, statAggregator?: StatAggregator | null, debug?: DebugLogger, logger?:
|
|
17
|
+
constructor(datachannel: RTCDataChannel, participantIdRegistry: ParticipantIdRegistry, onStream: (streamId: string, stream: MediaStream) => void, onEos: (streamId: string) => void, onStat: IOnStat, statAggregator?: StatAggregator | null, debug?: DebugLogger, logger?: StatEventCollector | null);
|
|
18
18
|
private _onDataChannelMessage;
|
|
19
19
|
/**
|
|
20
20
|
* Отправить запрос ключевого кадра в datachannel.
|