@whereby.com/media 2.8.2 → 2.8.4
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/dist/index.cjs +82 -133
- package/dist/index.d.cts +369 -369
- package/dist/index.d.mts +369 -369
- package/dist/index.d.ts +369 -369
- package/dist/index.mjs +82 -133
- package/dist/legacy-esm.js +82 -133
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -315,252 +315,6 @@ declare function detectMicrophoneNotWorking(pc: any): any;
|
|
|
315
315
|
|
|
316
316
|
declare const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
317
317
|
|
|
318
|
-
declare enum RtcEventNames {
|
|
319
|
-
rtc_manager_created = "rtc_manager_created",
|
|
320
|
-
stream_added = "stream_added"
|
|
321
|
-
}
|
|
322
|
-
interface RtcManager {
|
|
323
|
-
acceptNewStream: ({ activeBreakout, clientId, shouldAddLocalVideo, streamId, }: {
|
|
324
|
-
activeBreakout: boolean;
|
|
325
|
-
clientId: string;
|
|
326
|
-
shouldAddLocalVideo: boolean;
|
|
327
|
-
streamId: string;
|
|
328
|
-
}) => void;
|
|
329
|
-
addNewStream(streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean): void;
|
|
330
|
-
disconnect(streamId: string, activeBreakout: boolean | null, eventClaim?: string): void;
|
|
331
|
-
disconnectAll(): void;
|
|
332
|
-
rtcStatsDisconnect(): void;
|
|
333
|
-
rtcStatsReconnect(): void;
|
|
334
|
-
replaceTrack(oldTrack: CustomMediaStreamTrack, newTrack: CustomMediaStreamTrack): void;
|
|
335
|
-
removeStream(streamId: string, _stream: MediaStream, requestedByClientId: string | null): void;
|
|
336
|
-
shouldAcceptStreamsFromBothSides?: () => boolean;
|
|
337
|
-
updateStreamResolution(streamId: string, ignored: null, resolution: {
|
|
338
|
-
width: number;
|
|
339
|
-
height: number;
|
|
340
|
-
}): void;
|
|
341
|
-
sendStatsCustomEvent(eventName: string, data: unknown): void;
|
|
342
|
-
isInitializedWith({ selfId, roomName, isSfu }: {
|
|
343
|
-
selfId: string;
|
|
344
|
-
roomName: string;
|
|
345
|
-
isSfu: boolean;
|
|
346
|
-
}): boolean;
|
|
347
|
-
setEventClaim?(eventClaim: string): void;
|
|
348
|
-
hasClient(clientId: string): boolean;
|
|
349
|
-
}
|
|
350
|
-
interface RtcManagerCreatedPayload {
|
|
351
|
-
rtcManager: RtcManager;
|
|
352
|
-
}
|
|
353
|
-
interface RtcStreamAddedPayload {
|
|
354
|
-
clientId: string;
|
|
355
|
-
stream: MediaStream;
|
|
356
|
-
streamId: string | undefined;
|
|
357
|
-
streamType: "webcam" | "screenshare" | undefined;
|
|
358
|
-
}
|
|
359
|
-
interface RtcClientConnectionStatusChangedPayload {
|
|
360
|
-
streamIds: string[];
|
|
361
|
-
clientId: string;
|
|
362
|
-
status: string;
|
|
363
|
-
previous: string;
|
|
364
|
-
}
|
|
365
|
-
interface RtcLocalStreamTrackAddedPayload {
|
|
366
|
-
streamId: string;
|
|
367
|
-
tracks: MediaStreamTrack[];
|
|
368
|
-
screenShare: boolean;
|
|
369
|
-
}
|
|
370
|
-
interface RtcLocalStreamTrackRemovedPayload {
|
|
371
|
-
stream: MediaStream;
|
|
372
|
-
track: MediaStreamTrack;
|
|
373
|
-
}
|
|
374
|
-
type RtcEvents = {
|
|
375
|
-
client_connection_status_changed: RtcClientConnectionStatusChangedPayload;
|
|
376
|
-
stream_added: RtcStreamAddedPayload;
|
|
377
|
-
rtc_manager_created: RtcManagerCreatedPayload;
|
|
378
|
-
rtc_manager_destroyed: void;
|
|
379
|
-
local_stream_track_added: RtcLocalStreamTrackAddedPayload;
|
|
380
|
-
local_stream_track_removed: RtcLocalStreamTrackRemovedPayload;
|
|
381
|
-
remote_stream_track_added: void;
|
|
382
|
-
remote_stream_track_removed: void;
|
|
383
|
-
};
|
|
384
|
-
type UnifiedPlanSDP = {
|
|
385
|
-
sdp: string;
|
|
386
|
-
sdpU: string;
|
|
387
|
-
type: RTCSdpType;
|
|
388
|
-
};
|
|
389
|
-
type SDPRelayMessage = {
|
|
390
|
-
clientId: string;
|
|
391
|
-
message: UnifiedPlanSDP;
|
|
392
|
-
};
|
|
393
|
-
type GetMediaConstraintsOptions = {
|
|
394
|
-
disableAEC: boolean;
|
|
395
|
-
disableAGC: boolean;
|
|
396
|
-
hd: boolean;
|
|
397
|
-
lax: boolean;
|
|
398
|
-
lowDataMode: boolean;
|
|
399
|
-
preferredDeviceIds: {
|
|
400
|
-
audioId?: boolean | string | null | {
|
|
401
|
-
ideal?: string | null;
|
|
402
|
-
exact?: string | null;
|
|
403
|
-
};
|
|
404
|
-
videoId?: boolean | string | null | {
|
|
405
|
-
ideal?: string | null;
|
|
406
|
-
exact?: string | null;
|
|
407
|
-
};
|
|
408
|
-
};
|
|
409
|
-
resolution?: string;
|
|
410
|
-
simulcast: boolean;
|
|
411
|
-
widescreen: boolean;
|
|
412
|
-
usingAspectRatio16x9: boolean;
|
|
413
|
-
};
|
|
414
|
-
type GetConstraintsOptions = {
|
|
415
|
-
devices: MediaDeviceInfo[];
|
|
416
|
-
audioId?: boolean | string;
|
|
417
|
-
videoId?: boolean | string;
|
|
418
|
-
type?: "ideal" | "exact";
|
|
419
|
-
options: Omit<GetMediaConstraintsOptions, "preferredDeviceIds">;
|
|
420
|
-
};
|
|
421
|
-
type GetStreamOptions = {
|
|
422
|
-
replaceStream?: MediaStream;
|
|
423
|
-
fallback?: boolean;
|
|
424
|
-
};
|
|
425
|
-
type GetStreamResult = {
|
|
426
|
-
error?: unknown;
|
|
427
|
-
replacedTracks?: MediaStreamTrack[];
|
|
428
|
-
stream: MediaStream;
|
|
429
|
-
};
|
|
430
|
-
type UpdatedDeviceInfo = {
|
|
431
|
-
deviceId?: string | null;
|
|
432
|
-
kind?: MediaDeviceKind;
|
|
433
|
-
label?: string;
|
|
434
|
-
};
|
|
435
|
-
type UpdatedDevicesInfo = {
|
|
436
|
-
audioinput?: UpdatedDeviceInfo;
|
|
437
|
-
videoinput?: UpdatedDeviceInfo;
|
|
438
|
-
audiooutput?: UpdatedDeviceInfo;
|
|
439
|
-
};
|
|
440
|
-
type GetUpdatedDevicesResult = {
|
|
441
|
-
addedDevices: UpdatedDevicesInfo;
|
|
442
|
-
changedDevices: UpdatedDevicesInfo;
|
|
443
|
-
removedDevices: UpdatedDevicesInfo;
|
|
444
|
-
};
|
|
445
|
-
type GetDeviceDataResult = {
|
|
446
|
-
audio: {
|
|
447
|
-
deviceId: string;
|
|
448
|
-
label: string;
|
|
449
|
-
kind: string;
|
|
450
|
-
};
|
|
451
|
-
video: {
|
|
452
|
-
deviceId: string;
|
|
453
|
-
label: string;
|
|
454
|
-
kind: string;
|
|
455
|
-
};
|
|
456
|
-
};
|
|
457
|
-
interface CustomMediaStreamTrack extends MediaStreamTrack {
|
|
458
|
-
effectTrack?: boolean;
|
|
459
|
-
replaced?: boolean;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
declare function getMediaConstraints({ disableAEC, disableAGC, hd, lax, lowDataMode, preferredDeviceIds, resolution, simulcast, widescreen, }: GetMediaConstraintsOptions): any;
|
|
463
|
-
declare function getConstraints({ devices, videoId, audioId, options, type }: GetConstraintsOptions): any;
|
|
464
|
-
|
|
465
|
-
declare const isMobile: boolean;
|
|
466
|
-
declare class NoDevicesError extends Error {
|
|
467
|
-
constructor(...args: any);
|
|
468
|
-
}
|
|
469
|
-
declare function enumerate(): Promise<MediaDeviceInfo[]>;
|
|
470
|
-
declare function buildDeviceList({ busyDeviceIds, devices, kind }: any): any;
|
|
471
|
-
declare function getUserMedia(constraints: any): Promise<MediaStream>;
|
|
472
|
-
declare function getDeviceData({ audioTrack, videoTrack, devices, stoppedVideoTrack, lastAudioId, lastVideoId, }: {
|
|
473
|
-
audioTrack?: MediaStreamTrack | null;
|
|
474
|
-
videoTrack?: MediaStreamTrack | null;
|
|
475
|
-
devices: MediaDeviceInfo[];
|
|
476
|
-
stoppedVideoTrack?: boolean;
|
|
477
|
-
lastAudioId?: string | undefined;
|
|
478
|
-
lastVideoId?: string | undefined;
|
|
479
|
-
}): GetDeviceDataResult;
|
|
480
|
-
declare function stopStreamTracks(stream: MediaStream, only?: "audio" | "video" | false): void;
|
|
481
|
-
declare function replaceTracksInStream(stream: MediaStream, newStream: MediaStream, only: "audio" | "video" | false): MediaStreamTrack[];
|
|
482
|
-
declare function getStream(constraintOpt: any, { replaceStream, fallback }?: GetStreamOptions): Promise<GetStreamResult>;
|
|
483
|
-
declare function hasGetDisplayMedia(): boolean;
|
|
484
|
-
declare function getDisplayMedia(constraints?: {
|
|
485
|
-
video: {
|
|
486
|
-
width: {
|
|
487
|
-
max: number;
|
|
488
|
-
};
|
|
489
|
-
height: {
|
|
490
|
-
max: number;
|
|
491
|
-
};
|
|
492
|
-
};
|
|
493
|
-
}, contentHint?: string): Promise<MediaStream>;
|
|
494
|
-
declare function compareLocalDevices(before: MediaDeviceInfo[], after: MediaDeviceInfo[]): any;
|
|
495
|
-
declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, currentVideoId, currentSpeakerId, }: {
|
|
496
|
-
oldDevices: MediaDeviceInfo[];
|
|
497
|
-
newDevices: MediaDeviceInfo[];
|
|
498
|
-
currentAudioId?: string | undefined;
|
|
499
|
-
currentVideoId?: string | undefined;
|
|
500
|
-
currentSpeakerId?: string | undefined;
|
|
501
|
-
}): GetUpdatedDevicesResult;
|
|
502
|
-
|
|
503
|
-
interface P2PSessionOptions {
|
|
504
|
-
peerConnectionId: string;
|
|
505
|
-
clientId: string;
|
|
506
|
-
bandwidth: number;
|
|
507
|
-
peerConnectionConfig: RTCConfiguration;
|
|
508
|
-
deprioritizeH264Encoding: boolean;
|
|
509
|
-
shouldAddLocalVideo: boolean;
|
|
510
|
-
incrementAnalyticMetric: P2PIncrementAnalyticMetric;
|
|
511
|
-
}
|
|
512
|
-
declare class Session {
|
|
513
|
-
peerConnectionId: any;
|
|
514
|
-
relayCandidateSeen: boolean;
|
|
515
|
-
serverReflexiveCandidateSeen: boolean;
|
|
516
|
-
publicHostCandidateSeen: boolean;
|
|
517
|
-
ipv6HostCandidateSeen: boolean;
|
|
518
|
-
ipv6HostCandidateTeredoSeen: boolean;
|
|
519
|
-
ipv6HostCandidate6to4Seen: boolean;
|
|
520
|
-
mdnsHostCandidateSeen: boolean;
|
|
521
|
-
pc: RTCPeerConnection;
|
|
522
|
-
wasEverConnected: boolean;
|
|
523
|
-
connectionStatus: any;
|
|
524
|
-
stats: {
|
|
525
|
-
totalSent: number;
|
|
526
|
-
totalRecv: number;
|
|
527
|
-
};
|
|
528
|
-
bandwidth: any;
|
|
529
|
-
pending: any[];
|
|
530
|
-
isOperationPending: boolean;
|
|
531
|
-
streamIds: any[];
|
|
532
|
-
streams: MediaStream[];
|
|
533
|
-
earlyIceCandidates: any[];
|
|
534
|
-
afterConnected: Promise<unknown>;
|
|
535
|
-
registerConnected: any;
|
|
536
|
-
offerOptions: {
|
|
537
|
-
offerToReceiveAudio: boolean;
|
|
538
|
-
offerToReceiveVideo: boolean;
|
|
539
|
-
};
|
|
540
|
-
_deprioritizeH264Encoding: any;
|
|
541
|
-
clientId: any;
|
|
542
|
-
peerConnectionConfig: RTCConfiguration;
|
|
543
|
-
shouldAddLocalVideo: boolean;
|
|
544
|
-
signalingState: any;
|
|
545
|
-
srdComplete: any;
|
|
546
|
-
_incrementAnalyticMetric: P2PIncrementAnalyticMetric;
|
|
547
|
-
constructor({ peerConnectionId, clientId, bandwidth, peerConnectionConfig, deprioritizeH264Encoding, shouldAddLocalVideo, incrementAnalyticMetric, }: P2PSessionOptions);
|
|
548
|
-
addStream(stream: MediaStream): void;
|
|
549
|
-
addTrack(track: MediaStreamTrack, stream?: MediaStream): void;
|
|
550
|
-
removeTrack(track: MediaStreamTrack): void;
|
|
551
|
-
removeStream(stream: MediaStream): void;
|
|
552
|
-
_setRemoteDescription(desc: any): any;
|
|
553
|
-
handleOffer(message: RTCSessionDescription): any;
|
|
554
|
-
handleAnswer(message: RTCSessionDescription): any;
|
|
555
|
-
addIceCandidate(candidate: any): void;
|
|
556
|
-
canModifyPeerConnection(): boolean;
|
|
557
|
-
close(): void;
|
|
558
|
-
hasConnectedPeerConnection(): boolean;
|
|
559
|
-
replaceTrack(oldTrack: CustomMediaStreamTrack | undefined, newTrack: CustomMediaStreamTrack | undefined): false | RTCRtpSender | Promise<CustomMediaStreamTrack>;
|
|
560
|
-
changeBandwidth(bandwidth: any): void;
|
|
561
|
-
setAudioOnly(enable: boolean, excludedTrackIds?: string[]): void;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
318
|
declare const assert: {
|
|
565
319
|
fail: (message?: string | Error) => void;
|
|
566
320
|
ok: (value: any, message?: string | Error) => void;
|
|
@@ -946,23 +700,33 @@ interface ForbiddenError {
|
|
|
946
700
|
error: ForbiddenErrorNames;
|
|
947
701
|
}
|
|
948
702
|
type RoomJoinedErrors = RoomLockedError | RoomFullError | RoomConcurrencyControlsError | CannotJoinUnclaimedRoomError | OrganizationPlanExhaustedError | RoomMeetingTimeExhaustedError | MaxViewerLimitReachedError | HostPresenceControlsError | ForbiddenError | InternalServerError | InvalidAssistantKeyError | OrganizationAssistantNotFoundError | OrganizationAssistantNotEnabledError;
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
isLocked: boolean;
|
|
954
|
-
clients: SignalClient[];
|
|
955
|
-
knockers: SignalKnocker[];
|
|
956
|
-
spotlights: Spotlight[];
|
|
957
|
-
session: {
|
|
958
|
-
createdAt: string;
|
|
959
|
-
id: string;
|
|
960
|
-
} | null;
|
|
703
|
+
type SignalRoom = {
|
|
704
|
+
clients: SignalClient[];
|
|
705
|
+
iceServers: {
|
|
706
|
+
iceServers: SignalIceServer[];
|
|
961
707
|
};
|
|
708
|
+
isClaimed: boolean;
|
|
709
|
+
isLocked: boolean;
|
|
710
|
+
knockers: SignalKnocker[];
|
|
711
|
+
mediaserverConfigTtlSeconds: number;
|
|
712
|
+
mode: RoomMode;
|
|
713
|
+
name: string;
|
|
714
|
+
organizationId: string;
|
|
715
|
+
spotlights: Spotlight[];
|
|
716
|
+
session: {
|
|
717
|
+
createdAt: string;
|
|
718
|
+
id: string;
|
|
719
|
+
} | null;
|
|
720
|
+
sfuServer?: SignalSFUServer;
|
|
721
|
+
turnServers: SignalTurnServer[];
|
|
722
|
+
};
|
|
723
|
+
interface RoomJoinedSuccess {
|
|
724
|
+
room: SignalRoom;
|
|
962
725
|
selfId: string;
|
|
963
726
|
breakoutGroup?: string | null;
|
|
964
727
|
clientClaim: string;
|
|
965
728
|
breakout?: BreakoutConfig;
|
|
729
|
+
eventClaim: string;
|
|
966
730
|
}
|
|
967
731
|
type RoomJoinedEvent = RoomJoinedErrors | RoomJoinedSuccess;
|
|
968
732
|
interface BreakoutSessionUpdatedEvent extends BreakoutConfig {
|
|
@@ -1116,67 +880,345 @@ interface RemoveSpotlightRequest {
|
|
|
1116
880
|
clientId: string;
|
|
1117
881
|
streamId: string;
|
|
1118
882
|
}
|
|
1119
|
-
interface SignalRequests {
|
|
1120
|
-
add_spotlight: AddSpotlightRequest;
|
|
1121
|
-
chat_message: {
|
|
1122
|
-
text: string;
|
|
1123
|
-
};
|
|
1124
|
-
enable_audio: {
|
|
1125
|
-
enabled: boolean;
|
|
883
|
+
interface SignalRequests {
|
|
884
|
+
add_spotlight: AddSpotlightRequest;
|
|
885
|
+
chat_message: {
|
|
886
|
+
text: string;
|
|
887
|
+
};
|
|
888
|
+
enable_audio: {
|
|
889
|
+
enabled: boolean;
|
|
890
|
+
};
|
|
891
|
+
enable_video: {
|
|
892
|
+
enabled: boolean;
|
|
893
|
+
};
|
|
894
|
+
handle_knock: {
|
|
895
|
+
action: "accept" | "reject";
|
|
896
|
+
clientId: string;
|
|
897
|
+
response: unknown;
|
|
898
|
+
};
|
|
899
|
+
identify_device: IdentifyDeviceRequest;
|
|
900
|
+
join_room: JoinRoomRequest;
|
|
901
|
+
knock_room: KnockRoomRequest;
|
|
902
|
+
leave_room: void;
|
|
903
|
+
remove_spotlight: RemoveSpotlightRequest;
|
|
904
|
+
request_audio_enable: AudioEnableRequest;
|
|
905
|
+
request_video_enable: VideoEnableRequest;
|
|
906
|
+
send_client_metadata: {
|
|
907
|
+
type: string;
|
|
908
|
+
payload: {
|
|
909
|
+
displayName?: string;
|
|
910
|
+
stickyReaction?: unknown;
|
|
911
|
+
};
|
|
912
|
+
};
|
|
913
|
+
set_lock: {
|
|
914
|
+
locked: boolean;
|
|
915
|
+
};
|
|
916
|
+
start_recording: {
|
|
917
|
+
recording: string;
|
|
918
|
+
};
|
|
919
|
+
stop_recording: void;
|
|
920
|
+
}
|
|
921
|
+
type TurnTransportProtocol = "onlyudp" | "onlytcp" | "onlytls";
|
|
922
|
+
|
|
923
|
+
declare function fromLocation({ host, protocol }?: {
|
|
924
|
+
host?: string | undefined;
|
|
925
|
+
protocol?: string | undefined;
|
|
926
|
+
}): {
|
|
927
|
+
domain: string;
|
|
928
|
+
domainWithSeparator: string;
|
|
929
|
+
organizationDomain: string;
|
|
930
|
+
organization: string;
|
|
931
|
+
service: string;
|
|
932
|
+
subdomain: string;
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
type TrackAnnotation = {
|
|
936
|
+
fromGetDisplayMedia: boolean;
|
|
937
|
+
};
|
|
938
|
+
declare function trackAnnotations(o: MediaStreamTrack): TrackAnnotation;
|
|
939
|
+
|
|
940
|
+
declare enum RtcEventNames {
|
|
941
|
+
rtc_manager_created = "rtc_manager_created",
|
|
942
|
+
stream_added = "stream_added"
|
|
943
|
+
}
|
|
944
|
+
type RtcEventEmitter = {
|
|
945
|
+
emit: <K extends keyof RtcEvents>(eventName: K, args?: RtcEvents[K]) => void;
|
|
946
|
+
};
|
|
947
|
+
interface RtcManagerOptions {
|
|
948
|
+
selfId: string;
|
|
949
|
+
room: SignalRoom;
|
|
950
|
+
emitter: RtcEventEmitter;
|
|
951
|
+
serverSocket: ServerSocket;
|
|
952
|
+
webrtcProvider: any;
|
|
953
|
+
features: any;
|
|
954
|
+
}
|
|
955
|
+
interface VegaRtcManagerOptions extends RtcManagerOptions {
|
|
956
|
+
eventClaim: string;
|
|
957
|
+
}
|
|
958
|
+
interface RtcManager {
|
|
959
|
+
acceptNewStream: ({ clientId, streamId }: {
|
|
960
|
+
clientId: string;
|
|
961
|
+
streamId: string;
|
|
962
|
+
}) => void;
|
|
963
|
+
addNewStream(streamId: string, stream: MediaStream, isAudioEnabled: boolean, isVideoEnabled: boolean): void;
|
|
964
|
+
disconnect(streamId: string, eventClaim?: string): void;
|
|
965
|
+
disconnectAll(): void;
|
|
966
|
+
rtcStatsDisconnect(): void;
|
|
967
|
+
rtcStatsReconnect(): void;
|
|
968
|
+
replaceTrack(oldTrack: CustomMediaStreamTrack, newTrack: CustomMediaStreamTrack): void;
|
|
969
|
+
removeStream(streamId: string, _stream: MediaStream, requestedByClientId: string | null): void;
|
|
970
|
+
shouldAcceptStreamsFromBothSides: () => boolean;
|
|
971
|
+
updateStreamResolution(streamId: string, ignored: null, resolution: {
|
|
972
|
+
width: number;
|
|
973
|
+
height: number;
|
|
974
|
+
}): void;
|
|
975
|
+
sendStatsCustomEvent(eventName: string, data: unknown): void;
|
|
976
|
+
isInitializedWith({ selfId, roomName, isSfu }: {
|
|
977
|
+
selfId: string;
|
|
978
|
+
roomName: string;
|
|
979
|
+
isSfu: boolean;
|
|
980
|
+
}): boolean;
|
|
981
|
+
setEventClaim?(eventClaim: string): void;
|
|
982
|
+
hasClient(clientId: string): boolean;
|
|
983
|
+
}
|
|
984
|
+
interface RtcManagerCreatedPayload {
|
|
985
|
+
rtcManager: RtcManager;
|
|
986
|
+
}
|
|
987
|
+
interface RtcStreamAddedPayload {
|
|
988
|
+
clientId: string;
|
|
989
|
+
stream: MediaStream;
|
|
990
|
+
streamId: string | undefined;
|
|
991
|
+
streamType: "webcam" | "screenshare" | undefined;
|
|
992
|
+
}
|
|
993
|
+
interface RtcClientConnectionStatusChangedPayload {
|
|
994
|
+
streamIds: string[];
|
|
995
|
+
clientId: string;
|
|
996
|
+
status: string;
|
|
997
|
+
previous: string;
|
|
998
|
+
}
|
|
999
|
+
interface RtcLocalStreamTrackAddedPayload {
|
|
1000
|
+
streamId: string;
|
|
1001
|
+
tracks: MediaStreamTrack[];
|
|
1002
|
+
screenShare: boolean;
|
|
1003
|
+
}
|
|
1004
|
+
interface RtcLocalStreamTrackRemovedPayload {
|
|
1005
|
+
stream: MediaStream;
|
|
1006
|
+
track: MediaStreamTrack;
|
|
1007
|
+
}
|
|
1008
|
+
type RtcEvents = {
|
|
1009
|
+
client_connection_status_changed: RtcClientConnectionStatusChangedPayload;
|
|
1010
|
+
stream_added: RtcStreamAddedPayload;
|
|
1011
|
+
rtc_manager_created: RtcManagerCreatedPayload;
|
|
1012
|
+
rtc_manager_destroyed: void;
|
|
1013
|
+
local_stream_track_added: RtcLocalStreamTrackAddedPayload;
|
|
1014
|
+
local_stream_track_removed: RtcLocalStreamTrackRemovedPayload;
|
|
1015
|
+
remote_stream_track_added: void;
|
|
1016
|
+
remote_stream_track_removed: void;
|
|
1017
|
+
};
|
|
1018
|
+
type UnifiedPlanSDP = {
|
|
1019
|
+
sdp: string;
|
|
1020
|
+
sdpU: string;
|
|
1021
|
+
type: RTCSdpType;
|
|
1022
|
+
};
|
|
1023
|
+
type SDPRelayMessage = {
|
|
1024
|
+
clientId: string;
|
|
1025
|
+
message: UnifiedPlanSDP;
|
|
1026
|
+
};
|
|
1027
|
+
type GetMediaConstraintsOptions = {
|
|
1028
|
+
disableAEC: boolean;
|
|
1029
|
+
disableAGC: boolean;
|
|
1030
|
+
hd: boolean;
|
|
1031
|
+
lax: boolean;
|
|
1032
|
+
lowDataMode: boolean;
|
|
1033
|
+
preferredDeviceIds: {
|
|
1034
|
+
audioId?: boolean | string | null | {
|
|
1035
|
+
ideal?: string | null;
|
|
1036
|
+
exact?: string | null;
|
|
1037
|
+
};
|
|
1038
|
+
videoId?: boolean | string | null | {
|
|
1039
|
+
ideal?: string | null;
|
|
1040
|
+
exact?: string | null;
|
|
1041
|
+
};
|
|
1126
1042
|
};
|
|
1127
|
-
|
|
1128
|
-
|
|
1043
|
+
resolution?: string;
|
|
1044
|
+
simulcast: boolean;
|
|
1045
|
+
widescreen: boolean;
|
|
1046
|
+
usingAspectRatio16x9: boolean;
|
|
1047
|
+
};
|
|
1048
|
+
type GetConstraintsOptions = {
|
|
1049
|
+
devices: MediaDeviceInfo[];
|
|
1050
|
+
audioId?: boolean | string;
|
|
1051
|
+
videoId?: boolean | string;
|
|
1052
|
+
type?: "ideal" | "exact";
|
|
1053
|
+
options: Omit<GetMediaConstraintsOptions, "preferredDeviceIds">;
|
|
1054
|
+
};
|
|
1055
|
+
type GetStreamOptions = {
|
|
1056
|
+
replaceStream?: MediaStream;
|
|
1057
|
+
fallback?: boolean;
|
|
1058
|
+
};
|
|
1059
|
+
type GetStreamResult = {
|
|
1060
|
+
error?: unknown;
|
|
1061
|
+
replacedTracks?: MediaStreamTrack[];
|
|
1062
|
+
stream: MediaStream;
|
|
1063
|
+
};
|
|
1064
|
+
type UpdatedDeviceInfo = {
|
|
1065
|
+
deviceId?: string | null;
|
|
1066
|
+
kind?: MediaDeviceKind;
|
|
1067
|
+
label?: string;
|
|
1068
|
+
};
|
|
1069
|
+
type UpdatedDevicesInfo = {
|
|
1070
|
+
audioinput?: UpdatedDeviceInfo;
|
|
1071
|
+
videoinput?: UpdatedDeviceInfo;
|
|
1072
|
+
audiooutput?: UpdatedDeviceInfo;
|
|
1073
|
+
};
|
|
1074
|
+
type GetUpdatedDevicesResult = {
|
|
1075
|
+
addedDevices: UpdatedDevicesInfo;
|
|
1076
|
+
changedDevices: UpdatedDevicesInfo;
|
|
1077
|
+
removedDevices: UpdatedDevicesInfo;
|
|
1078
|
+
};
|
|
1079
|
+
type GetDeviceDataResult = {
|
|
1080
|
+
audio: {
|
|
1081
|
+
deviceId: string;
|
|
1082
|
+
label: string;
|
|
1083
|
+
kind: string;
|
|
1129
1084
|
};
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1085
|
+
video: {
|
|
1086
|
+
deviceId: string;
|
|
1087
|
+
label: string;
|
|
1088
|
+
kind: string;
|
|
1134
1089
|
};
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1090
|
+
};
|
|
1091
|
+
interface CustomMediaStreamTrack extends MediaStreamTrack {
|
|
1092
|
+
effectTrack?: boolean;
|
|
1093
|
+
replaced?: boolean;
|
|
1094
|
+
}
|
|
1095
|
+
type SignalIceServer = {
|
|
1096
|
+
credential: string;
|
|
1097
|
+
url: string;
|
|
1098
|
+
urls: string[];
|
|
1099
|
+
username: string;
|
|
1100
|
+
};
|
|
1101
|
+
type SignalTurnServer = {
|
|
1102
|
+
credential: string;
|
|
1103
|
+
urls: string | string[];
|
|
1104
|
+
username: string;
|
|
1105
|
+
};
|
|
1106
|
+
type SignalMediaServerConfig = {
|
|
1107
|
+
error?: any;
|
|
1108
|
+
mediaserverConfigTtlSeconds: number;
|
|
1109
|
+
iceServers: SignalIceServer[];
|
|
1110
|
+
turnServers: SignalTurnServer[];
|
|
1111
|
+
sfuServer?: SignalSFUServer;
|
|
1112
|
+
};
|
|
1113
|
+
type SignalSFUServer = {
|
|
1114
|
+
url: string;
|
|
1115
|
+
fallbackUrl?: string;
|
|
1116
|
+
fallbackServers?: any[];
|
|
1117
|
+
};
|
|
1118
|
+
|
|
1119
|
+
declare function getMediaConstraints({ disableAEC, disableAGC, hd, lax, lowDataMode, preferredDeviceIds, resolution, simulcast, widescreen, }: GetMediaConstraintsOptions): any;
|
|
1120
|
+
declare function getConstraints({ devices, videoId, audioId, options, type }: GetConstraintsOptions): any;
|
|
1121
|
+
|
|
1122
|
+
declare const isMobile: boolean;
|
|
1123
|
+
declare class NoDevicesError extends Error {
|
|
1124
|
+
constructor(...args: any);
|
|
1125
|
+
}
|
|
1126
|
+
declare function enumerate(): Promise<MediaDeviceInfo[]>;
|
|
1127
|
+
declare function buildDeviceList({ busyDeviceIds, devices, kind }: any): any;
|
|
1128
|
+
declare function getUserMedia(constraints: any): Promise<MediaStream>;
|
|
1129
|
+
declare function getDeviceData({ audioTrack, videoTrack, devices, stoppedVideoTrack, lastAudioId, lastVideoId, }: {
|
|
1130
|
+
audioTrack?: MediaStreamTrack | null;
|
|
1131
|
+
videoTrack?: MediaStreamTrack | null;
|
|
1132
|
+
devices: MediaDeviceInfo[];
|
|
1133
|
+
stoppedVideoTrack?: boolean;
|
|
1134
|
+
lastAudioId?: string | undefined;
|
|
1135
|
+
lastVideoId?: string | undefined;
|
|
1136
|
+
}): GetDeviceDataResult;
|
|
1137
|
+
declare function stopStreamTracks(stream: MediaStream, only?: "audio" | "video" | false): void;
|
|
1138
|
+
declare function replaceTracksInStream(stream: MediaStream, newStream: MediaStream, only: "audio" | "video" | false): MediaStreamTrack[];
|
|
1139
|
+
declare function getStream(constraintOpt: any, { replaceStream, fallback }?: GetStreamOptions): Promise<GetStreamResult>;
|
|
1140
|
+
declare function hasGetDisplayMedia(): boolean;
|
|
1141
|
+
declare function getDisplayMedia(constraints?: {
|
|
1142
|
+
video: {
|
|
1143
|
+
width: {
|
|
1144
|
+
max: number;
|
|
1145
|
+
};
|
|
1146
|
+
height: {
|
|
1147
|
+
max: number;
|
|
1147
1148
|
};
|
|
1148
1149
|
};
|
|
1149
|
-
|
|
1150
|
-
|
|
1150
|
+
}, contentHint?: string): Promise<MediaStream>;
|
|
1151
|
+
declare function compareLocalDevices(before: MediaDeviceInfo[], after: MediaDeviceInfo[]): any;
|
|
1152
|
+
declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, currentVideoId, currentSpeakerId, }: {
|
|
1153
|
+
oldDevices: MediaDeviceInfo[];
|
|
1154
|
+
newDevices: MediaDeviceInfo[];
|
|
1155
|
+
currentAudioId?: string | undefined;
|
|
1156
|
+
currentVideoId?: string | undefined;
|
|
1157
|
+
currentSpeakerId?: string | undefined;
|
|
1158
|
+
}): GetUpdatedDevicesResult;
|
|
1159
|
+
|
|
1160
|
+
interface P2PSessionOptions {
|
|
1161
|
+
peerConnectionId: string;
|
|
1162
|
+
clientId: string;
|
|
1163
|
+
bandwidth: number;
|
|
1164
|
+
peerConnectionConfig: RTCConfiguration;
|
|
1165
|
+
deprioritizeH264Encoding: boolean;
|
|
1166
|
+
incrementAnalyticMetric: P2PIncrementAnalyticMetric;
|
|
1167
|
+
}
|
|
1168
|
+
declare class Session {
|
|
1169
|
+
peerConnectionId: any;
|
|
1170
|
+
relayCandidateSeen: boolean;
|
|
1171
|
+
serverReflexiveCandidateSeen: boolean;
|
|
1172
|
+
publicHostCandidateSeen: boolean;
|
|
1173
|
+
ipv6HostCandidateSeen: boolean;
|
|
1174
|
+
ipv6HostCandidateTeredoSeen: boolean;
|
|
1175
|
+
ipv6HostCandidate6to4Seen: boolean;
|
|
1176
|
+
mdnsHostCandidateSeen: boolean;
|
|
1177
|
+
pc: RTCPeerConnection;
|
|
1178
|
+
wasEverConnected: boolean;
|
|
1179
|
+
connectionStatus: any;
|
|
1180
|
+
stats: {
|
|
1181
|
+
totalSent: number;
|
|
1182
|
+
totalRecv: number;
|
|
1151
1183
|
};
|
|
1152
|
-
|
|
1153
|
-
|
|
1184
|
+
bandwidth: any;
|
|
1185
|
+
pending: any[];
|
|
1186
|
+
isOperationPending: boolean;
|
|
1187
|
+
streamIds: string[];
|
|
1188
|
+
streams: MediaStream[];
|
|
1189
|
+
earlyIceCandidates: any[];
|
|
1190
|
+
afterConnected: Promise<unknown>;
|
|
1191
|
+
registerConnected: any;
|
|
1192
|
+
offerOptions: {
|
|
1193
|
+
offerToReceiveAudio: boolean;
|
|
1194
|
+
offerToReceiveVideo: boolean;
|
|
1154
1195
|
};
|
|
1155
|
-
|
|
1196
|
+
_deprioritizeH264Encoding: any;
|
|
1197
|
+
clientId: any;
|
|
1198
|
+
peerConnectionConfig: RTCConfiguration;
|
|
1199
|
+
signalingState: any;
|
|
1200
|
+
srdComplete: any;
|
|
1201
|
+
_incrementAnalyticMetric: P2PIncrementAnalyticMetric;
|
|
1202
|
+
constructor({ peerConnectionId, clientId, bandwidth, peerConnectionConfig, deprioritizeH264Encoding, incrementAnalyticMetric, }: P2PSessionOptions);
|
|
1203
|
+
addStream(stream: MediaStream): void;
|
|
1204
|
+
addTrack(track: MediaStreamTrack, stream?: MediaStream): void;
|
|
1205
|
+
removeTrack(track: MediaStreamTrack): void;
|
|
1206
|
+
removeStream(stream: MediaStream): void;
|
|
1207
|
+
_setRemoteDescription(desc: any): any;
|
|
1208
|
+
handleOffer(message: RTCSessionDescription): any;
|
|
1209
|
+
handleAnswer(message: RTCSessionDescription): any;
|
|
1210
|
+
addIceCandidate(candidate: any): void;
|
|
1211
|
+
canModifyPeerConnection(): boolean;
|
|
1212
|
+
close(): void;
|
|
1213
|
+
hasConnectedPeerConnection(): boolean;
|
|
1214
|
+
replaceTrack(oldTrack: CustomMediaStreamTrack | undefined, newTrack: CustomMediaStreamTrack | undefined): false | RTCRtpSender | Promise<CustomMediaStreamTrack>;
|
|
1215
|
+
changeBandwidth(bandwidth: any): void;
|
|
1216
|
+
setAudioOnly(enable: boolean, excludedTrackIds?: string[]): void;
|
|
1156
1217
|
}
|
|
1157
|
-
type TurnTransportProtocol = "onlyudp" | "onlytcp" | "onlytls";
|
|
1158
|
-
|
|
1159
|
-
declare function fromLocation({ host, protocol }?: {
|
|
1160
|
-
host?: string | undefined;
|
|
1161
|
-
protocol?: string | undefined;
|
|
1162
|
-
}): {
|
|
1163
|
-
domain: string;
|
|
1164
|
-
domainWithSeparator: string;
|
|
1165
|
-
organizationDomain: string;
|
|
1166
|
-
organization: string;
|
|
1167
|
-
service: string;
|
|
1168
|
-
subdomain: string;
|
|
1169
|
-
};
|
|
1170
|
-
|
|
1171
|
-
type TrackAnnotation = {
|
|
1172
|
-
fromGetDisplayMedia: boolean;
|
|
1173
|
-
};
|
|
1174
|
-
declare function trackAnnotations(o: MediaStreamTrack): TrackAnnotation;
|
|
1175
1218
|
|
|
1176
1219
|
interface GetOrCreateSessionOptions {
|
|
1177
1220
|
peerConnectionId: string;
|
|
1178
1221
|
clientId: string;
|
|
1179
|
-
shouldAddLocalVideo: boolean;
|
|
1180
1222
|
initialBandwidth: number;
|
|
1181
1223
|
peerConnectionConfig: RTCConfiguration;
|
|
1182
1224
|
}
|
|
@@ -1237,7 +1279,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1237
1279
|
_videoTrackOnEnded: () => void;
|
|
1238
1280
|
_iceServers: any;
|
|
1239
1281
|
_turnServers: any;
|
|
1240
|
-
_sfuServer: any;
|
|
1241
1282
|
_mediaserverConfigTtlSeconds: any;
|
|
1242
1283
|
_fetchMediaServersTimer: any;
|
|
1243
1284
|
_wasScreenSharing: any;
|
|
@@ -1249,19 +1290,12 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1249
1290
|
skipEmittingServerMessageCount: number;
|
|
1250
1291
|
analytics: P2PAnalytics;
|
|
1251
1292
|
_rtcStatsDisconnectTimeout?: ReturnType<typeof setTimeout>;
|
|
1252
|
-
constructor({ selfId, room, emitter, serverSocket, webrtcProvider, features
|
|
1253
|
-
selfId: any;
|
|
1254
|
-
room: any;
|
|
1255
|
-
emitter: any;
|
|
1256
|
-
serverSocket: ServerSocket;
|
|
1257
|
-
webrtcProvider: any;
|
|
1258
|
-
features: any;
|
|
1259
|
-
});
|
|
1293
|
+
constructor({ selfId, room, emitter, serverSocket, webrtcProvider, features }: RtcManagerOptions);
|
|
1260
1294
|
numberOfPeerconnections(): number;
|
|
1261
1295
|
isInitializedWith({ selfId, roomName, isSfu }: {
|
|
1262
|
-
selfId:
|
|
1263
|
-
roomName:
|
|
1264
|
-
isSfu:
|
|
1296
|
+
selfId: string;
|
|
1297
|
+
roomName: string;
|
|
1298
|
+
isSfu: boolean;
|
|
1265
1299
|
}): boolean;
|
|
1266
1300
|
supportsScreenShareAudio(): boolean;
|
|
1267
1301
|
addNewStream(streamId: string, stream: MediaStream, audioPaused: boolean, videoPaused: boolean, beforeEffectTracks?: CustomMediaStreamTrack[]): void;
|
|
@@ -1285,19 +1319,18 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1285
1319
|
_addEnabledLocalStreamId(streamId: string): void;
|
|
1286
1320
|
_deleteEnabledLocalStreamId(streamId: string): void;
|
|
1287
1321
|
_getSession(peerConnectionId: string): Session | null;
|
|
1288
|
-
_getOrCreateSession({ peerConnectionId, clientId, initialBandwidth, peerConnectionConfig,
|
|
1322
|
+
_getOrCreateSession({ peerConnectionId, clientId, initialBandwidth, peerConnectionConfig, }: GetOrCreateSessionOptions): Session;
|
|
1289
1323
|
_getLocalCameraStream(): any;
|
|
1290
1324
|
_getNonLocalCameraStreamIds(): string[];
|
|
1291
1325
|
_isScreensharingLocally(): boolean;
|
|
1292
1326
|
_getFirstLocalNonCameraStream(): any;
|
|
1293
1327
|
_transformIncomingSdp(original: UnifiedPlanSDP): RTCSessionDescription;
|
|
1294
1328
|
_transformOutgoingSdp(original: RTCSessionDescription): UnifiedPlanSDP;
|
|
1295
|
-
_createSession({ clientId, initialBandwidth, isOfferer, peerConnectionId,
|
|
1329
|
+
_createSession({ clientId, initialBandwidth, isOfferer, peerConnectionId, }: {
|
|
1296
1330
|
clientId: string;
|
|
1297
1331
|
initialBandwidth: any;
|
|
1298
1332
|
isOfferer: any;
|
|
1299
1333
|
peerConnectionId: string;
|
|
1300
|
-
shouldAddLocalVideo: boolean;
|
|
1301
1334
|
}): Session;
|
|
1302
1335
|
_cleanup(peerConnectionId: string): void;
|
|
1303
1336
|
_forEachPeerConnection(func: any): void;
|
|
@@ -1308,7 +1341,7 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1308
1341
|
_removeTrackFromPeerConnections(track: any): void;
|
|
1309
1342
|
_addLocalStream(streamId: string, stream: any): void;
|
|
1310
1343
|
_removeLocalStream(streamId: string): void;
|
|
1311
|
-
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers,
|
|
1344
|
+
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, mediaserverConfigTtlSeconds, }: SignalMediaServerConfig): void;
|
|
1312
1345
|
_clearMediaServersRefresh(): void;
|
|
1313
1346
|
_monitorAudioTrack(track: any): void;
|
|
1314
1347
|
_monitorVideoTrack(track: CustomMediaStreamTrack): void;
|
|
@@ -1318,16 +1351,14 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1318
1351
|
_negotiatePeerConnection(clientId: string, session: any, constraints?: any): void;
|
|
1319
1352
|
_withForcedRenegotiation(session: Session, action: any): void;
|
|
1320
1353
|
_changeBandwidthForAllClients(isJoining: boolean): number;
|
|
1321
|
-
_createP2pSession({ clientId, initialBandwidth,
|
|
1354
|
+
_createP2pSession({ clientId, initialBandwidth, isOfferer, }: {
|
|
1322
1355
|
clientId: string;
|
|
1323
1356
|
initialBandwidth: number;
|
|
1324
|
-
shouldAddLocalVideo: boolean;
|
|
1325
1357
|
isOfferer: boolean;
|
|
1326
1358
|
}): Session;
|
|
1327
|
-
acceptNewStream({ streamId, clientId
|
|
1359
|
+
acceptNewStream({ streamId, clientId }: {
|
|
1328
1360
|
streamId: string;
|
|
1329
1361
|
clientId: string;
|
|
1330
|
-
shouldAddLocalVideo?: boolean;
|
|
1331
1362
|
}): Session;
|
|
1332
1363
|
disconnect(clientId: string): void;
|
|
1333
1364
|
updateStreamResolution(): void;
|
|
@@ -1340,6 +1371,7 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1340
1371
|
_shareScreen(streamId: string, stream: any): void;
|
|
1341
1372
|
removeStream(streamId: string, stream: any, requestedByClientId: any): void;
|
|
1342
1373
|
hasClient(clientId: string): boolean;
|
|
1374
|
+
shouldAcceptStreamsFromBothSides(): boolean;
|
|
1343
1375
|
}
|
|
1344
1376
|
|
|
1345
1377
|
declare class RtcManagerDispatcher {
|
|
@@ -1348,9 +1380,7 @@ declare class RtcManagerDispatcher {
|
|
|
1348
1380
|
};
|
|
1349
1381
|
currentManager: RtcManager | null;
|
|
1350
1382
|
constructor({ emitter, serverSocket, webrtcProvider, features, }: {
|
|
1351
|
-
emitter:
|
|
1352
|
-
emit: <K extends keyof RtcEvents>(eventName: K, args?: RtcEvents[K]) => void;
|
|
1353
|
-
};
|
|
1383
|
+
emitter: RtcEventEmitter;
|
|
1354
1384
|
serverSocket: ServerSocket;
|
|
1355
1385
|
webrtcProvider: any;
|
|
1356
1386
|
features: any;
|
|
@@ -1621,7 +1651,7 @@ declare class VegaRtcManager implements RtcManager {
|
|
|
1621
1651
|
_fetchMediaServersTimer: any;
|
|
1622
1652
|
_iceServers: any;
|
|
1623
1653
|
_turnServers: any;
|
|
1624
|
-
_sfuServer
|
|
1654
|
+
_sfuServer?: SignalSFUServer;
|
|
1625
1655
|
_sfuServers?: HostListEntryOptionalDC[];
|
|
1626
1656
|
_mediaserverConfigTtlSeconds: any;
|
|
1627
1657
|
_videoTrackBeingMonitored?: CustomMediaStreamTrack;
|
|
@@ -1631,22 +1661,8 @@ declare class VegaRtcManager implements RtcManager {
|
|
|
1631
1661
|
_networkIsDetectedUpBySignal: boolean;
|
|
1632
1662
|
_cpuOveruseDetected: boolean;
|
|
1633
1663
|
analytics: VegaAnalytics;
|
|
1634
|
-
constructor({ selfId, room, emitter, serverSocket, webrtcProvider, features, eventClaim
|
|
1635
|
-
|
|
1636
|
-
room: any;
|
|
1637
|
-
emitter: any;
|
|
1638
|
-
serverSocket: any;
|
|
1639
|
-
webrtcProvider: any;
|
|
1640
|
-
features?: any;
|
|
1641
|
-
eventClaim?: string;
|
|
1642
|
-
});
|
|
1643
|
-
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, sfuServer, sfuServers, mediaserverConfigTtlSeconds, }: {
|
|
1644
|
-
iceServers: any;
|
|
1645
|
-
turnServers: any;
|
|
1646
|
-
sfuServer: any;
|
|
1647
|
-
sfuServers: any;
|
|
1648
|
-
mediaserverConfigTtlSeconds: any;
|
|
1649
|
-
}): void;
|
|
1664
|
+
constructor({ selfId, room, emitter, serverSocket, webrtcProvider, features, eventClaim }: VegaRtcManagerOptions);
|
|
1665
|
+
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, sfuServer, mediaserverConfigTtlSeconds, }: SignalMediaServerConfig): void;
|
|
1650
1666
|
_clearMediaServersRefresh(): void;
|
|
1651
1667
|
_onNetworkIsDetectedUpBySignal(): void;
|
|
1652
1668
|
_onNetworkIsDetectedPossiblyDownBySignal(): void;
|
|
@@ -1687,7 +1703,7 @@ declare class VegaRtcManager implements RtcManager {
|
|
|
1687
1703
|
setAudioOnly(audioOnly: boolean): void;
|
|
1688
1704
|
setRemoteScreenshareVideoTrackIds(): void;
|
|
1689
1705
|
setRoomSessionId(roomSessionId: string): void;
|
|
1690
|
-
disconnect(
|
|
1706
|
+
disconnect(clientId: string, eventClaim?: string): void;
|
|
1691
1707
|
replaceTrack(oldTrack: CustomMediaStreamTrack | null, track: CustomMediaStreamTrack): void;
|
|
1692
1708
|
removeStream(streamId: string, _stream: MediaStream, requestedByClientId: string): void;
|
|
1693
1709
|
_onMicAnalyserScoreUpdated(data: any): void;
|
|
@@ -1901,27 +1917,11 @@ declare const PROTOCOL_EVENTS: {
|
|
|
1901
1917
|
MEDIA_QUALITY_CHANGED: string;
|
|
1902
1918
|
};
|
|
1903
1919
|
|
|
1920
|
+
declare const CAMERA_STREAM_ID = "0";
|
|
1904
1921
|
declare const STREAM_TYPES: {
|
|
1905
|
-
|
|
1906
|
-
|
|
1922
|
+
webcam: string;
|
|
1923
|
+
screenshare: string;
|
|
1907
1924
|
};
|
|
1908
|
-
declare class RtcStream {
|
|
1909
|
-
id: string;
|
|
1910
|
-
type: string;
|
|
1911
|
-
isEnabled: boolean;
|
|
1912
|
-
hasSupportForAutoSuperSize: boolean;
|
|
1913
|
-
isAudioEnabled: boolean;
|
|
1914
|
-
isVideoEnabled: boolean;
|
|
1915
|
-
status: string;
|
|
1916
|
-
stream: MediaStream | null;
|
|
1917
|
-
streamId: string | null;
|
|
1918
|
-
constructor(id: string | number, type: string);
|
|
1919
|
-
setup(stream: MediaStream): this;
|
|
1920
|
-
setStatus(status: string): this;
|
|
1921
|
-
setVideoEnabled(isEnabled: boolean): void;
|
|
1922
|
-
setAudioEnabled(isEnabled: boolean): void;
|
|
1923
|
-
static getCameraId(): string;
|
|
1924
|
-
}
|
|
1925
1925
|
|
|
1926
|
-
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher,
|
|
1927
|
-
export type { AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, CannotJoinUnclaimedRoomError, ChatMessage, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, CustomMediaStreamTrack, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomFullError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcStreamAddedPayload, SDPRelayMessage, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalKnocker, SignalRequests, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UnifiedPlanSDP, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent };
|
|
1926
|
+
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, issueDetectorOrMetricEnabled, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, variance };
|
|
1927
|
+
export type { AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, CannotJoinUnclaimedRoomError, ChatMessage, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, CustomMediaStreamTrack, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomFullError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, SDPRelayMessage, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRequests, SignalRoom, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UnifiedPlanSDP, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent };
|