@dtelecom/livekit-client 1.12.1
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/LICENSE +175 -0
- package/README.md +315 -0
- package/dist/@dtelecom/livekit-client.e2ee.worker.js +2 -0
- package/dist/@dtelecom/livekit-client.e2ee.worker.js.map +1 -0
- package/dist/@dtelecom/livekit-client.e2ee.worker.mjs +1633 -0
- package/dist/@dtelecom/livekit-client.e2ee.worker.mjs.map +1 -0
- package/dist/@dtelecom/livekit-client.esm.mjs +22545 -0
- package/dist/@dtelecom/livekit-client.esm.mjs.map +1 -0
- package/dist/@dtelecom/livekit-client.umd.js +2 -0
- package/dist/@dtelecom/livekit-client.umd.js.map +1 -0
- package/dist/@dtelecom/src/api/SignalClient.d.ts +102 -0
- package/dist/@dtelecom/src/api/SignalClient.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/ConnectionCheck.d.ts +26 -0
- package/dist/@dtelecom/src/connectionHelper/ConnectionCheck.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/Checker.d.ts +59 -0
- package/dist/@dtelecom/src/connectionHelper/checks/Checker.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/publishAudio.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/publishAudio.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/publishVideo.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/publishVideo.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/reconnect.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/reconnect.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/turn.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/turn.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/webrtc.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/webrtc.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/websocket.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/websocket.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/E2eeManager.d.ts +47 -0
- package/dist/@dtelecom/src/e2ee/E2eeManager.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/KeyProvider.d.ts +44 -0
- package/dist/@dtelecom/src/e2ee/KeyProvider.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/constants.d.ts +15 -0
- package/dist/@dtelecom/src/e2ee/constants.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/errors.d.ts +11 -0
- package/dist/@dtelecom/src/e2ee/errors.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/index.d.ts +4 -0
- package/dist/@dtelecom/src/e2ee/index.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/types.d.ts +130 -0
- package/dist/@dtelecom/src/e2ee/types.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/utils.d.ts +24 -0
- package/dist/@dtelecom/src/e2ee/utils.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/worker/FrameCryptor.d.ts +176 -0
- package/dist/@dtelecom/src/e2ee/worker/FrameCryptor.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/worker/ParticipantKeyHandler.d.ts +65 -0
- package/dist/@dtelecom/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/worker/e2ee.worker.d.ts +2 -0
- package/dist/@dtelecom/src/e2ee/worker/e2ee.worker.d.ts.map +1 -0
- package/dist/@dtelecom/src/index.d.ts +38 -0
- package/dist/@dtelecom/src/index.d.ts.map +1 -0
- package/dist/@dtelecom/src/logger.d.ts +29 -0
- package/dist/@dtelecom/src/logger.d.ts.map +1 -0
- package/dist/@dtelecom/src/options.d.ts +104 -0
- package/dist/@dtelecom/src/options.d.ts.map +1 -0
- package/dist/@dtelecom/src/proto/livekit_models_pb.d.ts +1264 -0
- package/dist/@dtelecom/src/proto/livekit_models_pb.d.ts.map +1 -0
- package/dist/@dtelecom/src/proto/livekit_rtc_pb.d.ts +1373 -0
- package/dist/@dtelecom/src/proto/livekit_rtc_pb.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/DefaultReconnectPolicy.d.ts +8 -0
- package/dist/@dtelecom/src/room/DefaultReconnectPolicy.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/DeviceManager.d.ts +9 -0
- package/dist/@dtelecom/src/room/DeviceManager.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/PCTransport.d.ts +41 -0
- package/dist/@dtelecom/src/room/PCTransport.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/RTCEngine.d.ts +143 -0
- package/dist/@dtelecom/src/room/RTCEngine.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/ReconnectPolicy.d.ts +24 -0
- package/dist/@dtelecom/src/room/ReconnectPolicy.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/RegionUrlProvider.d.ts +17 -0
- package/dist/@dtelecom/src/room/RegionUrlProvider.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/Room.d.ts +248 -0
- package/dist/@dtelecom/src/room/Room.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/defaults.d.ts +8 -0
- package/dist/@dtelecom/src/room/defaults.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/errors.d.ts +43 -0
- package/dist/@dtelecom/src/room/errors.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/events.d.ts +477 -0
- package/dist/@dtelecom/src/room/events.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/LocalParticipant.d.ts +177 -0
- package/dist/@dtelecom/src/room/participant/LocalParticipant.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/Participant.d.ts +95 -0
- package/dist/@dtelecom/src/room/participant/Participant.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/ParticipantTrackPermission.d.ts +26 -0
- package/dist/@dtelecom/src/room/participant/ParticipantTrackPermission.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/RemoteParticipant.d.ts +55 -0
- package/dist/@dtelecom/src/room/participant/RemoteParticipant.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/publishUtils.d.ts +28 -0
- package/dist/@dtelecom/src/room/participant/publishUtils.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/stats.d.ts +67 -0
- package/dist/@dtelecom/src/room/stats.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/timers.d.ts +13 -0
- package/dist/@dtelecom/src/room/timers.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/LocalAudioTrack.d.ts +25 -0
- package/dist/@dtelecom/src/room/track/LocalAudioTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/LocalTrack.d.ts +78 -0
- package/dist/@dtelecom/src/room/track/LocalTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/LocalTrackPublication.d.ts +38 -0
- package/dist/@dtelecom/src/room/track/LocalTrackPublication.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/LocalVideoTrack.d.ts +54 -0
- package/dist/@dtelecom/src/room/track/LocalVideoTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/RemoteAudioTrack.d.ts +53 -0
- package/dist/@dtelecom/src/room/track/RemoteAudioTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/RemoteTrack.d.ts +15 -0
- package/dist/@dtelecom/src/room/track/RemoteTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/RemoteTrackPublication.d.ts +64 -0
- package/dist/@dtelecom/src/room/track/RemoteTrackPublication.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/RemoteVideoTrack.d.ts +56 -0
- package/dist/@dtelecom/src/room/track/RemoteVideoTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/Track.d.ts +125 -0
- package/dist/@dtelecom/src/room/track/Track.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/TrackPublication.d.ts +72 -0
- package/dist/@dtelecom/src/room/track/TrackPublication.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/create.d.ts +24 -0
- package/dist/@dtelecom/src/room/track/create.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/facingMode.d.ts +41 -0
- package/dist/@dtelecom/src/room/track/facingMode.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/options.d.ts +272 -0
- package/dist/@dtelecom/src/room/track/options.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/processor/types.d.ts +19 -0
- package/dist/@dtelecom/src/room/track/processor/types.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/types.d.ts +24 -0
- package/dist/@dtelecom/src/room/track/types.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/utils.d.ts +27 -0
- package/dist/@dtelecom/src/room/track/utils.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/types.d.ts +26 -0
- package/dist/@dtelecom/src/room/types.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/utils.d.ts +92 -0
- package/dist/@dtelecom/src/room/utils.d.ts.map +1 -0
- package/dist/@dtelecom/src/test/MockMediaStreamTrack.d.ts +26 -0
- package/dist/@dtelecom/src/test/MockMediaStreamTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/test/mocks.d.ts +12 -0
- package/dist/@dtelecom/src/test/mocks.d.ts.map +1 -0
- package/dist/@dtelecom/src/utils/AsyncQueue.d.ts +23 -0
- package/dist/@dtelecom/src/utils/AsyncQueue.d.ts.map +1 -0
- package/dist/@dtelecom/src/utils/browserParser.d.ts +12 -0
- package/dist/@dtelecom/src/utils/browserParser.d.ts.map +1 -0
- package/dist/@dtelecom/src/version.d.ts +3 -0
- package/dist/@dtelecom/src/version.d.ts.map +1 -0
- package/dist/ts4.2/@dtelecom/src/api/SignalClient.d.ts +105 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/ConnectionCheck.d.ts +26 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/Checker.d.ts +59 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/publishAudio.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/publishVideo.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/reconnect.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/turn.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/webrtc.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/websocket.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/E2eeManager.d.ts +47 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/KeyProvider.d.ts +44 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/constants.d.ts +15 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/errors.d.ts +11 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/index.d.ts +4 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/types.d.ts +130 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/utils.d.ts +24 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/worker/FrameCryptor.d.ts +176 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/worker/ParticipantKeyHandler.d.ts +65 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/worker/e2ee.worker.d.ts +2 -0
- package/dist/ts4.2/@dtelecom/src/index.d.ts +38 -0
- package/dist/ts4.2/@dtelecom/src/logger.d.ts +29 -0
- package/dist/ts4.2/@dtelecom/src/options.d.ts +104 -0
- package/dist/ts4.2/@dtelecom/src/proto/livekit_models_pb.d.ts +1264 -0
- package/dist/ts4.2/@dtelecom/src/proto/livekit_rtc_pb.d.ts +1373 -0
- package/dist/ts4.2/@dtelecom/src/room/DefaultReconnectPolicy.d.ts +8 -0
- package/dist/ts4.2/@dtelecom/src/room/DeviceManager.d.ts +9 -0
- package/dist/ts4.2/@dtelecom/src/room/PCTransport.d.ts +43 -0
- package/dist/ts4.2/@dtelecom/src/room/RTCEngine.d.ts +143 -0
- package/dist/ts4.2/@dtelecom/src/room/ReconnectPolicy.d.ts +24 -0
- package/dist/ts4.2/@dtelecom/src/room/RegionUrlProvider.d.ts +17 -0
- package/dist/ts4.2/@dtelecom/src/room/Room.d.ts +248 -0
- package/dist/ts4.2/@dtelecom/src/room/defaults.d.ts +8 -0
- package/dist/ts4.2/@dtelecom/src/room/errors.d.ts +43 -0
- package/dist/ts4.2/@dtelecom/src/room/events.d.ts +477 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/LocalParticipant.d.ts +177 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/Participant.d.ts +95 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/ParticipantTrackPermission.d.ts +26 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/RemoteParticipant.d.ts +55 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/publishUtils.d.ts +28 -0
- package/dist/ts4.2/@dtelecom/src/room/stats.d.ts +67 -0
- package/dist/ts4.2/@dtelecom/src/room/timers.d.ts +13 -0
- package/dist/ts4.2/@dtelecom/src/room/track/LocalAudioTrack.d.ts +25 -0
- package/dist/ts4.2/@dtelecom/src/room/track/LocalTrack.d.ts +78 -0
- package/dist/ts4.2/@dtelecom/src/room/track/LocalTrackPublication.d.ts +38 -0
- package/dist/ts4.2/@dtelecom/src/room/track/LocalVideoTrack.d.ts +54 -0
- package/dist/ts4.2/@dtelecom/src/room/track/RemoteAudioTrack.d.ts +53 -0
- package/dist/ts4.2/@dtelecom/src/room/track/RemoteTrack.d.ts +15 -0
- package/dist/ts4.2/@dtelecom/src/room/track/RemoteTrackPublication.d.ts +64 -0
- package/dist/ts4.2/@dtelecom/src/room/track/RemoteVideoTrack.d.ts +56 -0
- package/dist/ts4.2/@dtelecom/src/room/track/Track.d.ts +125 -0
- package/dist/ts4.2/@dtelecom/src/room/track/TrackPublication.d.ts +72 -0
- package/dist/ts4.2/@dtelecom/src/room/track/create.d.ts +24 -0
- package/dist/ts4.2/@dtelecom/src/room/track/facingMode.d.ts +41 -0
- package/dist/ts4.2/@dtelecom/src/room/track/options.d.ts +280 -0
- package/dist/ts4.2/@dtelecom/src/room/track/processor/types.d.ts +19 -0
- package/dist/ts4.2/@dtelecom/src/room/track/types.d.ts +24 -0
- package/dist/ts4.2/@dtelecom/src/room/track/utils.d.ts +27 -0
- package/dist/ts4.2/@dtelecom/src/room/types.d.ts +26 -0
- package/dist/ts4.2/@dtelecom/src/room/utils.d.ts +92 -0
- package/dist/ts4.2/@dtelecom/src/test/MockMediaStreamTrack.d.ts +26 -0
- package/dist/ts4.2/@dtelecom/src/test/mocks.d.ts +12 -0
- package/dist/ts4.2/@dtelecom/src/utils/AsyncQueue.d.ts +23 -0
- package/dist/ts4.2/@dtelecom/src/utils/browserParser.d.ts +12 -0
- package/dist/ts4.2/@dtelecom/src/version.d.ts +3 -0
- package/package.json +102 -0
- package/src/api/SignalClient.ts +790 -0
- package/src/connectionHelper/ConnectionCheck.ts +90 -0
- package/src/connectionHelper/checks/Checker.ts +163 -0
- package/src/connectionHelper/checks/publishAudio.ts +33 -0
- package/src/connectionHelper/checks/publishVideo.ts +33 -0
- package/src/connectionHelper/checks/reconnect.ts +45 -0
- package/src/connectionHelper/checks/turn.ts +54 -0
- package/src/connectionHelper/checks/webrtc.ts +82 -0
- package/src/connectionHelper/checks/websocket.ts +27 -0
- package/src/e2ee/E2eeManager.ts +375 -0
- package/src/e2ee/KeyProvider.ts +78 -0
- package/src/e2ee/constants.ts +44 -0
- package/src/e2ee/errors.ts +16 -0
- package/src/e2ee/index.ts +3 -0
- package/src/e2ee/types.ts +161 -0
- package/src/e2ee/utils.ts +127 -0
- package/src/e2ee/worker/FrameCryptor.test.ts +19 -0
- package/src/e2ee/worker/FrameCryptor.ts +612 -0
- package/src/e2ee/worker/ParticipantKeyHandler.ts +175 -0
- package/src/e2ee/worker/e2ee.worker.ts +223 -0
- package/src/e2ee/worker/tsconfig.json +6 -0
- package/src/index.ts +85 -0
- package/src/logger.ts +64 -0
- package/src/options.ts +127 -0
- package/src/proto/livekit_models_pb.ts +2096 -0
- package/src/proto/livekit_rtc_pb.ts +2332 -0
- package/src/room/DefaultReconnectPolicy.ts +35 -0
- package/src/room/DeviceManager.ts +88 -0
- package/src/room/PCTransport.ts +452 -0
- package/src/room/RTCEngine.ts +1421 -0
- package/src/room/ReconnectPolicy.ts +27 -0
- package/src/room/RegionUrlProvider.ts +82 -0
- package/src/room/Room.test.ts +30 -0
- package/src/room/Room.ts +1907 -0
- package/src/room/defaults.ts +49 -0
- package/src/room/errors.ts +90 -0
- package/src/room/events.ts +535 -0
- package/src/room/participant/LocalParticipant.ts +1350 -0
- package/src/room/participant/Participant.ts +299 -0
- package/src/room/participant/ParticipantTrackPermission.ts +42 -0
- package/src/room/participant/RemoteParticipant.ts +359 -0
- package/src/room/participant/publishUtils.test.ts +189 -0
- package/src/room/participant/publishUtils.ts +399 -0
- package/src/room/stats.ts +136 -0
- package/src/room/timers.ts +16 -0
- package/src/room/track/LocalAudioTrack.ts +171 -0
- package/src/room/track/LocalTrack.ts +430 -0
- package/src/room/track/LocalTrackPublication.ts +87 -0
- package/src/room/track/LocalVideoTrack.test.ts +73 -0
- package/src/room/track/LocalVideoTrack.ts +513 -0
- package/src/room/track/RemoteAudioTrack.ts +248 -0
- package/src/room/track/RemoteTrack.ts +62 -0
- package/src/room/track/RemoteTrackPublication.ts +311 -0
- package/src/room/track/RemoteVideoTrack.test.ts +152 -0
- package/src/room/track/RemoteVideoTrack.ts +410 -0
- package/src/room/track/Track.ts +452 -0
- package/src/room/track/TrackPublication.ts +158 -0
- package/src/room/track/create.ts +143 -0
- package/src/room/track/facingMode.test.ts +31 -0
- package/src/room/track/facingMode.ts +103 -0
- package/src/room/track/options.ts +362 -0
- package/src/room/track/processor/types.ts +20 -0
- package/src/room/track/types.ts +25 -0
- package/src/room/track/utils.test.ts +111 -0
- package/src/room/track/utils.ts +183 -0
- package/src/room/types.ts +39 -0
- package/src/room/utils.test.ts +16 -0
- package/src/room/utils.ts +501 -0
- package/src/room/worker.d.ts +4 -0
- package/src/test/MockMediaStreamTrack.ts +84 -0
- package/src/test/mocks.ts +19 -0
- package/src/utils/AsyncQueue.test.ts +100 -0
- package/src/utils/AsyncQueue.ts +57 -0
- package/src/utils/browserParser.test.ts +88 -0
- package/src/utils/browserParser.ts +74 -0
- package/src/version.ts +4 -0
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
import type { SignalClient } from '../../api/SignalClient';
|
|
2
|
+
import log from '../../logger';
|
|
3
|
+
import { VideoLayer, VideoQuality } from '../../proto/livekit_models_pb';
|
|
4
|
+
import { SubscribedCodec, SubscribedQuality } from '../../proto/livekit_rtc_pb';
|
|
5
|
+
import { computeBitrate, monitorFrequency } from '../stats';
|
|
6
|
+
import type { VideoSenderStats } from '../stats';
|
|
7
|
+
import { Mutex, isFireFox, isMobile, isWeb, unwrapConstraint } from '../utils';
|
|
8
|
+
import LocalTrack from './LocalTrack';
|
|
9
|
+
import { Track } from './Track';
|
|
10
|
+
import type { VideoCaptureOptions, VideoCodec } from './options';
|
|
11
|
+
import { constraintsForOptions } from './utils';
|
|
12
|
+
|
|
13
|
+
export class SimulcastTrackInfo {
|
|
14
|
+
codec: VideoCodec;
|
|
15
|
+
|
|
16
|
+
mediaStreamTrack: MediaStreamTrack;
|
|
17
|
+
|
|
18
|
+
sender?: RTCRtpSender;
|
|
19
|
+
|
|
20
|
+
encodings?: RTCRtpEncodingParameters[];
|
|
21
|
+
|
|
22
|
+
constructor(codec: VideoCodec, mediaStreamTrack: MediaStreamTrack) {
|
|
23
|
+
this.codec = codec;
|
|
24
|
+
this.mediaStreamTrack = mediaStreamTrack;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const refreshSubscribedCodecAfterNewCodec = 5000;
|
|
29
|
+
|
|
30
|
+
export default class LocalVideoTrack extends LocalTrack {
|
|
31
|
+
/* @internal */
|
|
32
|
+
signalClient?: SignalClient;
|
|
33
|
+
|
|
34
|
+
private prevStats?: Map<string, VideoSenderStats>;
|
|
35
|
+
|
|
36
|
+
private encodings?: RTCRtpEncodingParameters[];
|
|
37
|
+
|
|
38
|
+
/* @internal */
|
|
39
|
+
simulcastCodecs: Map<VideoCodec, SimulcastTrackInfo> = new Map<VideoCodec, SimulcastTrackInfo>();
|
|
40
|
+
|
|
41
|
+
private subscribedCodecs?: SubscribedCodec[];
|
|
42
|
+
|
|
43
|
+
// prevents concurrent manipulations to track sender
|
|
44
|
+
// if multiple get/setParameter are called concurrently, certain timing of events
|
|
45
|
+
// could lead to the browser throwing an exception in `setParameter`, due to
|
|
46
|
+
// a missing `getParameter` call.
|
|
47
|
+
private senderLock: Mutex;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @param mediaTrack
|
|
52
|
+
* @param constraints MediaTrackConstraints that are being used when restarting or reacquiring tracks
|
|
53
|
+
* @param userProvidedTrack Signals to the SDK whether or not the mediaTrack should be managed (i.e. released and reacquired) internally by the SDK
|
|
54
|
+
*/
|
|
55
|
+
constructor(
|
|
56
|
+
mediaTrack: MediaStreamTrack,
|
|
57
|
+
constraints?: MediaTrackConstraints,
|
|
58
|
+
userProvidedTrack = true,
|
|
59
|
+
) {
|
|
60
|
+
super(mediaTrack, Track.Kind.Video, constraints, userProvidedTrack);
|
|
61
|
+
this.senderLock = new Mutex();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
get isSimulcast(): boolean {
|
|
65
|
+
if (this.sender && this.sender.getParameters().encodings.length > 1) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* @internal */
|
|
72
|
+
startMonitor(signalClient: SignalClient) {
|
|
73
|
+
this.signalClient = signalClient;
|
|
74
|
+
if (!isWeb()) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
// save original encodings
|
|
78
|
+
// TODO : merge simulcast tracks stats
|
|
79
|
+
const params = this.sender?.getParameters();
|
|
80
|
+
if (params) {
|
|
81
|
+
this.encodings = params.encodings;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (this.monitorInterval) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.monitorInterval = setInterval(() => {
|
|
88
|
+
this.monitorSender();
|
|
89
|
+
}, monitorFrequency);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
stop() {
|
|
93
|
+
this._mediaStreamTrack.getConstraints();
|
|
94
|
+
this.simulcastCodecs.forEach((trackInfo) => {
|
|
95
|
+
trackInfo.mediaStreamTrack.stop();
|
|
96
|
+
});
|
|
97
|
+
super.stop();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
async mute(): Promise<LocalVideoTrack> {
|
|
101
|
+
const unlock = await this.muteLock.lock();
|
|
102
|
+
try {
|
|
103
|
+
if (this.source === Track.Source.Camera && !this.isUserProvided) {
|
|
104
|
+
log.debug('stopping camera track');
|
|
105
|
+
// also stop the track, so that camera indicator is turned off
|
|
106
|
+
this._mediaStreamTrack.stop();
|
|
107
|
+
}
|
|
108
|
+
await super.mute();
|
|
109
|
+
return this;
|
|
110
|
+
} finally {
|
|
111
|
+
unlock();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
async unmute(): Promise<LocalVideoTrack> {
|
|
116
|
+
const unlock = await this.muteLock.lock();
|
|
117
|
+
try {
|
|
118
|
+
if (this.source === Track.Source.Camera && !this.isUserProvided) {
|
|
119
|
+
log.debug('reacquiring camera track');
|
|
120
|
+
await this.restartTrack();
|
|
121
|
+
}
|
|
122
|
+
await super.unmute();
|
|
123
|
+
return this;
|
|
124
|
+
} finally {
|
|
125
|
+
unlock();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async getSenderStats(): Promise<VideoSenderStats[]> {
|
|
130
|
+
if (!this.sender?.getStats) {
|
|
131
|
+
return [];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const items: VideoSenderStats[] = [];
|
|
135
|
+
|
|
136
|
+
const stats = await this.sender.getStats();
|
|
137
|
+
stats.forEach((v) => {
|
|
138
|
+
if (v.type === 'outbound-rtp') {
|
|
139
|
+
const vs: VideoSenderStats = {
|
|
140
|
+
type: 'video',
|
|
141
|
+
streamId: v.id,
|
|
142
|
+
frameHeight: v.frameHeight,
|
|
143
|
+
frameWidth: v.frameWidth,
|
|
144
|
+
firCount: v.firCount,
|
|
145
|
+
pliCount: v.pliCount,
|
|
146
|
+
nackCount: v.nackCount,
|
|
147
|
+
packetsSent: v.packetsSent,
|
|
148
|
+
bytesSent: v.bytesSent,
|
|
149
|
+
framesSent: v.framesSent,
|
|
150
|
+
timestamp: v.timestamp,
|
|
151
|
+
rid: v.rid ?? v.id,
|
|
152
|
+
retransmittedPacketsSent: v.retransmittedPacketsSent,
|
|
153
|
+
qualityLimitationReason: v.qualityLimitationReason,
|
|
154
|
+
qualityLimitationResolutionChanges: v.qualityLimitationResolutionChanges,
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
// locate the appropriate remote-inbound-rtp item
|
|
158
|
+
const r = stats.get(v.remoteId);
|
|
159
|
+
if (r) {
|
|
160
|
+
vs.jitter = r.jitter;
|
|
161
|
+
vs.packetsLost = r.packetsLost;
|
|
162
|
+
vs.roundTripTime = r.roundTripTime;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
items.push(vs);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
return items;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
setPublishingQuality(maxQuality: VideoQuality) {
|
|
173
|
+
const qualities: SubscribedQuality[] = [];
|
|
174
|
+
for (let q = VideoQuality.LOW; q <= VideoQuality.HIGH; q += 1) {
|
|
175
|
+
qualities.push(
|
|
176
|
+
new SubscribedQuality({
|
|
177
|
+
quality: q,
|
|
178
|
+
enabled: q <= maxQuality,
|
|
179
|
+
}),
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
log.debug(`setting publishing quality. max quality ${maxQuality}`);
|
|
183
|
+
this.setPublishingLayers(qualities);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async setDeviceId(deviceId: ConstrainDOMString): Promise<boolean> {
|
|
187
|
+
if (
|
|
188
|
+
this._constraints.deviceId === deviceId &&
|
|
189
|
+
this._mediaStreamTrack.getSettings().deviceId === unwrapConstraint(deviceId)
|
|
190
|
+
) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
this._constraints.deviceId = deviceId;
|
|
194
|
+
// when video is muted, underlying media stream track is stopped and
|
|
195
|
+
// will be restarted later
|
|
196
|
+
if (!this.isMuted) {
|
|
197
|
+
await this.restartTrack();
|
|
198
|
+
}
|
|
199
|
+
return (
|
|
200
|
+
this.isMuted || unwrapConstraint(deviceId) === this._mediaStreamTrack.getSettings().deviceId
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
async restartTrack(options?: VideoCaptureOptions) {
|
|
205
|
+
let constraints: MediaTrackConstraints | undefined;
|
|
206
|
+
if (options) {
|
|
207
|
+
const streamConstraints = constraintsForOptions({ video: options });
|
|
208
|
+
if (typeof streamConstraints.video !== 'boolean') {
|
|
209
|
+
constraints = streamConstraints.video;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
await this.restart(constraints);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
addSimulcastTrack(codec: VideoCodec, encodings?: RTCRtpEncodingParameters[]): SimulcastTrackInfo {
|
|
216
|
+
if (this.simulcastCodecs.has(codec)) {
|
|
217
|
+
throw new Error(`${codec} already added`);
|
|
218
|
+
}
|
|
219
|
+
const simulcastCodecInfo: SimulcastTrackInfo = {
|
|
220
|
+
codec,
|
|
221
|
+
mediaStreamTrack: this.mediaStreamTrack.clone(),
|
|
222
|
+
sender: undefined,
|
|
223
|
+
encodings,
|
|
224
|
+
};
|
|
225
|
+
this.simulcastCodecs.set(codec, simulcastCodecInfo);
|
|
226
|
+
return simulcastCodecInfo;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
setSimulcastTrackSender(codec: VideoCodec, sender: RTCRtpSender) {
|
|
230
|
+
const simulcastCodecInfo = this.simulcastCodecs.get(codec);
|
|
231
|
+
if (!simulcastCodecInfo) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
simulcastCodecInfo.sender = sender;
|
|
235
|
+
|
|
236
|
+
// browser will reenable disabled codec/layers after new codec has been published,
|
|
237
|
+
// so refresh subscribedCodecs after publish a new codec
|
|
238
|
+
setTimeout(() => {
|
|
239
|
+
if (this.subscribedCodecs) {
|
|
240
|
+
this.setPublishingCodecs(this.subscribedCodecs);
|
|
241
|
+
}
|
|
242
|
+
}, refreshSubscribedCodecAfterNewCodec);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @internal
|
|
247
|
+
* Sets codecs that should be publishing
|
|
248
|
+
*/
|
|
249
|
+
async setPublishingCodecs(codecs: SubscribedCodec[]): Promise<VideoCodec[]> {
|
|
250
|
+
log.debug('setting publishing codecs', {
|
|
251
|
+
codecs,
|
|
252
|
+
currentCodec: this.codec,
|
|
253
|
+
});
|
|
254
|
+
// only enable simulcast codec for preference codec setted
|
|
255
|
+
if (!this.codec && codecs.length > 0) {
|
|
256
|
+
await this.setPublishingLayers(codecs[0].qualities);
|
|
257
|
+
return [];
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
this.subscribedCodecs = codecs;
|
|
261
|
+
|
|
262
|
+
const newCodecs: VideoCodec[] = [];
|
|
263
|
+
for await (const codec of codecs) {
|
|
264
|
+
if (!this.codec || this.codec === codec.codec) {
|
|
265
|
+
await this.setPublishingLayers(codec.qualities);
|
|
266
|
+
} else {
|
|
267
|
+
const simulcastCodecInfo = this.simulcastCodecs.get(codec.codec as VideoCodec);
|
|
268
|
+
log.debug(`try setPublishingCodec for ${codec.codec}`, simulcastCodecInfo);
|
|
269
|
+
if (!simulcastCodecInfo || !simulcastCodecInfo.sender) {
|
|
270
|
+
for (const q of codec.qualities) {
|
|
271
|
+
if (q.enabled) {
|
|
272
|
+
newCodecs.push(codec.codec as VideoCodec);
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
} else if (simulcastCodecInfo.encodings) {
|
|
277
|
+
log.debug(`try setPublishingLayersForSender ${codec.codec}`);
|
|
278
|
+
await setPublishingLayersForSender(
|
|
279
|
+
simulcastCodecInfo.sender,
|
|
280
|
+
simulcastCodecInfo.encodings!,
|
|
281
|
+
codec.qualities,
|
|
282
|
+
this.senderLock,
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return newCodecs;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @internal
|
|
292
|
+
* Sets layers that should be publishing
|
|
293
|
+
*/
|
|
294
|
+
async setPublishingLayers(qualities: SubscribedQuality[]) {
|
|
295
|
+
log.debug('setting publishing layers', qualities);
|
|
296
|
+
if (!this.sender || !this.encodings) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
await setPublishingLayersForSender(this.sender, this.encodings, qualities, this.senderLock);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
protected monitorSender = async () => {
|
|
304
|
+
if (!this.sender) {
|
|
305
|
+
this._currentBitrate = 0;
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
let stats: VideoSenderStats[] | undefined;
|
|
310
|
+
try {
|
|
311
|
+
stats = await this.getSenderStats();
|
|
312
|
+
} catch (e) {
|
|
313
|
+
log.error('could not get audio sender stats', { error: e });
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
const statsMap = new Map<string, VideoSenderStats>(stats.map((s) => [s.rid, s]));
|
|
317
|
+
|
|
318
|
+
if (this.prevStats) {
|
|
319
|
+
let totalBitrate = 0;
|
|
320
|
+
statsMap.forEach((s, key) => {
|
|
321
|
+
const prev = this.prevStats?.get(key);
|
|
322
|
+
totalBitrate += computeBitrate(s, prev);
|
|
323
|
+
});
|
|
324
|
+
this._currentBitrate = totalBitrate;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
this.prevStats = statsMap;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
protected async handleAppVisibilityChanged() {
|
|
331
|
+
await super.handleAppVisibilityChanged();
|
|
332
|
+
if (!isMobile()) return;
|
|
333
|
+
if (this.isInBackground && this.source === Track.Source.Camera) {
|
|
334
|
+
this._mediaStreamTrack.enabled = false;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
async function setPublishingLayersForSender(
|
|
340
|
+
sender: RTCRtpSender,
|
|
341
|
+
senderEncodings: RTCRtpEncodingParameters[],
|
|
342
|
+
qualities: SubscribedQuality[],
|
|
343
|
+
senderLock: Mutex,
|
|
344
|
+
) {
|
|
345
|
+
const unlock = await senderLock.lock();
|
|
346
|
+
log.debug('setPublishingLayersForSender', { sender, qualities, senderEncodings });
|
|
347
|
+
try {
|
|
348
|
+
const params = sender.getParameters();
|
|
349
|
+
const { encodings } = params;
|
|
350
|
+
if (!encodings) {
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
if (encodings.length !== senderEncodings.length) {
|
|
355
|
+
log.warn('cannot set publishing layers, encodings mismatch');
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
let hasChanged = false;
|
|
360
|
+
|
|
361
|
+
/* disable closable spatial layer as it has video blur / frozen issue with current server / client
|
|
362
|
+
1. chrome 113: when switching to up layer with scalability Mode change, it will generate a
|
|
363
|
+
low resolution frame and recover very quickly, but noticable
|
|
364
|
+
2. livekit sfu: additional pli request cause video frozen for a few frames, also noticable */
|
|
365
|
+
const closableSpatial = false;
|
|
366
|
+
/* @ts-ignore */
|
|
367
|
+
if (closableSpatial && encodings[0].scalabilityMode) {
|
|
368
|
+
// svc dynacast encodings
|
|
369
|
+
const encoding = encodings[0];
|
|
370
|
+
/* @ts-ignore */
|
|
371
|
+
// const mode = new ScalabilityMode(encoding.scalabilityMode);
|
|
372
|
+
let maxQuality = VideoQuality.OFF;
|
|
373
|
+
qualities.forEach((q) => {
|
|
374
|
+
if (q.enabled && (maxQuality === VideoQuality.OFF || q.quality > maxQuality)) {
|
|
375
|
+
maxQuality = q.quality;
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
if (maxQuality === VideoQuality.OFF) {
|
|
380
|
+
if (encoding.active) {
|
|
381
|
+
encoding.active = false;
|
|
382
|
+
hasChanged = true;
|
|
383
|
+
}
|
|
384
|
+
} else if (!encoding.active /* || mode.spatial !== maxQuality + 1*/) {
|
|
385
|
+
hasChanged = true;
|
|
386
|
+
encoding.active = true;
|
|
387
|
+
/*
|
|
388
|
+
@ts-ignore
|
|
389
|
+
const originalMode = new ScalabilityMode(senderEncodings[0].scalabilityMode)
|
|
390
|
+
mode.spatial = maxQuality + 1;
|
|
391
|
+
mode.suffix = originalMode.suffix;
|
|
392
|
+
if (mode.spatial === 1) {
|
|
393
|
+
// no suffix for L1Tx
|
|
394
|
+
mode.suffix = undefined;
|
|
395
|
+
}
|
|
396
|
+
@ts-ignore
|
|
397
|
+
encoding.scalabilityMode = mode.toString();
|
|
398
|
+
encoding.scaleResolutionDownBy = 2 ** (2 - maxQuality);
|
|
399
|
+
*/
|
|
400
|
+
}
|
|
401
|
+
} else {
|
|
402
|
+
// simulcast dynacast encodings
|
|
403
|
+
encodings.forEach((encoding, idx) => {
|
|
404
|
+
let rid = encoding.rid ?? '';
|
|
405
|
+
if (rid === '') {
|
|
406
|
+
rid = 'q';
|
|
407
|
+
}
|
|
408
|
+
const quality = videoQualityForRid(rid);
|
|
409
|
+
const subscribedQuality = qualities.find((q) => q.quality === quality);
|
|
410
|
+
if (!subscribedQuality) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
if (encoding.active !== subscribedQuality.enabled) {
|
|
414
|
+
hasChanged = true;
|
|
415
|
+
encoding.active = subscribedQuality.enabled;
|
|
416
|
+
log.debug(
|
|
417
|
+
`setting layer ${subscribedQuality.quality} to ${
|
|
418
|
+
encoding.active ? 'enabled' : 'disabled'
|
|
419
|
+
}`,
|
|
420
|
+
);
|
|
421
|
+
|
|
422
|
+
// FireFox does not support setting encoding.active to false, so we
|
|
423
|
+
// have a workaround of lowering its bitrate and resolution to the min.
|
|
424
|
+
if (isFireFox()) {
|
|
425
|
+
if (subscribedQuality.enabled) {
|
|
426
|
+
encoding.scaleResolutionDownBy = senderEncodings[idx].scaleResolutionDownBy;
|
|
427
|
+
encoding.maxBitrate = senderEncodings[idx].maxBitrate;
|
|
428
|
+
/* @ts-ignore */
|
|
429
|
+
encoding.maxFrameRate = senderEncodings[idx].maxFrameRate;
|
|
430
|
+
} else {
|
|
431
|
+
encoding.scaleResolutionDownBy = 4;
|
|
432
|
+
encoding.maxBitrate = 10;
|
|
433
|
+
/* @ts-ignore */
|
|
434
|
+
encoding.maxFrameRate = 2;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (hasChanged) {
|
|
442
|
+
params.encodings = encodings;
|
|
443
|
+
log.debug(`setting encodings`, params.encodings);
|
|
444
|
+
await sender.setParameters(params);
|
|
445
|
+
}
|
|
446
|
+
} finally {
|
|
447
|
+
unlock();
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export function videoQualityForRid(rid: string): VideoQuality {
|
|
452
|
+
switch (rid) {
|
|
453
|
+
case 'f':
|
|
454
|
+
return VideoQuality.HIGH;
|
|
455
|
+
case 'h':
|
|
456
|
+
return VideoQuality.MEDIUM;
|
|
457
|
+
case 'q':
|
|
458
|
+
return VideoQuality.LOW;
|
|
459
|
+
default:
|
|
460
|
+
return VideoQuality.HIGH;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export function videoLayersFromEncodings(
|
|
465
|
+
width: number,
|
|
466
|
+
height: number,
|
|
467
|
+
encodings?: RTCRtpEncodingParameters[],
|
|
468
|
+
svc?: boolean,
|
|
469
|
+
): VideoLayer[] {
|
|
470
|
+
// default to a single layer, HQ
|
|
471
|
+
if (!encodings) {
|
|
472
|
+
return [
|
|
473
|
+
new VideoLayer({
|
|
474
|
+
quality: VideoQuality.HIGH,
|
|
475
|
+
width,
|
|
476
|
+
height,
|
|
477
|
+
bitrate: 0,
|
|
478
|
+
ssrc: 0,
|
|
479
|
+
}),
|
|
480
|
+
];
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if (svc) {
|
|
484
|
+
// svc layers
|
|
485
|
+
/* @ts-ignore */
|
|
486
|
+
const sm = new ScalabilityMode(encodings[0].scalabilityMode);
|
|
487
|
+
const layers = [];
|
|
488
|
+
for (let i = 0; i < sm.spatial; i += 1) {
|
|
489
|
+
layers.push(
|
|
490
|
+
new VideoLayer({
|
|
491
|
+
quality: VideoQuality.HIGH - i,
|
|
492
|
+
width: width / 2 ** i,
|
|
493
|
+
height: height / 2 ** i,
|
|
494
|
+
bitrate: encodings[0].maxBitrate ? encodings[0].maxBitrate / 3 ** i : 0,
|
|
495
|
+
ssrc: 0,
|
|
496
|
+
}),
|
|
497
|
+
);
|
|
498
|
+
}
|
|
499
|
+
return layers;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
return encodings.map((encoding) => {
|
|
503
|
+
const scale = encoding.scaleResolutionDownBy ?? 1;
|
|
504
|
+
let quality = videoQualityForRid(encoding.rid ?? '');
|
|
505
|
+
return new VideoLayer({
|
|
506
|
+
quality,
|
|
507
|
+
width: width / scale,
|
|
508
|
+
height: height / scale,
|
|
509
|
+
bitrate: encoding.maxBitrate ?? 0,
|
|
510
|
+
ssrc: 0,
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
}
|