@@ -5,7 +5,6 @@ import JitsiConference, { IConferenceOptions } from '../../JitsiConference';
55import * as JitsiConferenceEvents from '../../JitsiConferenceEvents' ;
66import { BridgeVideoType } from '../../service/RTC/BridgeVideoType' ;
77import { CameraFacingMode } from '../../service/RTC/CameraFacingMode' ;
8- import { CodecMimeType } from '../../service/RTC/CodecMimeType' ;
98import { MediaType } from '../../service/RTC/MediaType' ;
109import RTCEvents from '../../service/RTC/RTCEvents' ;
1110import SignalingLayer , { SourceName } from '../../service/RTC/SignalingLayer' ;
@@ -19,7 +18,7 @@ import BridgeChannel from './BridgeChannel';
1918import JitsiLocalTrack , { IStreamEffect , ITrackConstraints } from './JitsiLocalTrack' ;
2019import JitsiRemoteTrack from './JitsiRemoteTrack' ;
2120import RTCUtils from './RTCUtils' ;
22- import TraceablePeerConnection from './TraceablePeerConnection' ;
21+ import TraceablePeerConnection , { ITPCOptions } from './TraceablePeerConnection' ;
2322
2423// Extend RTCConfiguration to include the encodedInsertableStreams property
2524interface IExtendedRTCConfiguration extends RTCConfiguration {
@@ -131,20 +130,6 @@ export interface IRTCOptions {
131130 } ;
132131}
133132
134- /**
135- * Interface for createPeerConnection options
136- */
137- export interface ICreatePeerConnectionOptions {
138- audioQuality : object ;
139- capScreenshareBitrate : boolean ;
140- codecSettings : CodecMimeType [ ] ;
141- disableRtx : boolean ;
142- disableSimulcast : boolean ;
143- enableInsertableStreams : boolean ;
144- forceTurnRelay : boolean ;
145- startSilent : boolean ;
146- videoQuality : object ;
147- }
148133/**
149134 *
150135 */
@@ -276,7 +261,7 @@ export default class RTC extends Listenable {
276261 enteringForwardedSources = forwardedSources . filter (
277262 sourceName => oldForwardedSources . indexOf ( sourceName ) === - 1 ) ;
278263
279- logger . debug ( `Fowarded sources changed leaving=${ leavingForwardedSources } , entering=`
264+ logger . debug ( `Forwarded sources changed leaving=${ leavingForwardedSources } , entering=`
280265 + `${ enteringForwardedSources } at ${ timestamp } ` ) ;
281266 this . conference . eventEmitter . emit (
282267 JitsiConferenceEvents . FORWARDED_SOURCES_CHANGED ,
@@ -293,8 +278,9 @@ export default class RTC extends Listenable {
293278 * @return {boolean } <tt>true</tt> if the given peer connection was removed
294279 * successfully or <tt>false</tt> if there was no peer connection mapped in
295280 * this RTC instance.
281+ * @internal
296282 */
297- private _removePeerConnection ( traceablePeerConnection : TraceablePeerConnection ) : boolean {
283+ _removePeerConnection ( traceablePeerConnection : TraceablePeerConnection ) : boolean {
298284 const id = traceablePeerConnection . id ;
299285
300286 if ( this . peerConnections . has ( id ) ) {
@@ -460,7 +446,7 @@ export default class RTC extends Listenable {
460446
461447 this . _receiverVideoConstraints = cloneDeep ( constraints ) ;
462448
463- if ( this ? ._channel . isOpen ( ) ) {
449+ if ( this . _channel ? .isOpen ( ) ) {
464450 this . _channel . sendReceiverVideoConstraintsMessage ( constraints ) ;
465451 }
466452 }
@@ -471,7 +457,7 @@ export default class RTC extends Listenable {
471457 * @param {BridgeVideoType } videoType - the track's video type.
472458 */
473459 public sendSourceVideoType ( sourceName : SourceName , videoType : BridgeVideoType ) : void {
474- if ( this ? ._channel . isOpen ( ) ) {
460+ if ( this . _channel ? .isOpen ( ) ) {
475461 this . _channel . sendSourceVideoTypeMessage ( sourceName , videoType ) ;
476462 }
477463 }
@@ -497,7 +483,7 @@ export default class RTC extends Listenable {
497483 * @param {Object } options.videoQuality - Quality settings to applied on the outbound video streams.
498484 * @return {TraceablePeerConnection }
499485 */
500- public createPeerConnection ( signaling : SignalingLayer , pcConfig : IExtendedRTCConfiguration , isP2P : boolean , options : ICreatePeerConnectionOptions ) : TraceablePeerConnection {
486+ public createPeerConnection ( signaling : SignalingLayer , pcConfig : IExtendedRTCConfiguration , isP2P : boolean , options : ITPCOptions ) : TraceablePeerConnection {
501487 const pcConstraints = { } ;
502488
503489 if ( options . enableInsertableStreams ) {
@@ -832,7 +818,7 @@ export default class RTC extends Listenable {
832818 * @throws NetworkError/InvalidStateError/Error if the operation fails or if there is no data channel created.
833819 */
834820 public sendEndpointStatsMessage ( payload : any ) : void {
835- if ( this ? ._channel . isOpen ( ) ) {
821+ if ( this . _channel ? .isOpen ( ) ) {
836822 this . _channel . sendEndpointStatsMessage ( payload ) ;
837823 }
838824 }
@@ -842,7 +828,7 @@ export default class RTC extends Listenable {
842828 * @param {* } message
843829 */
844830 public sendReceiverAudioSubscriptionMessage ( message : any ) : void {
845- if ( this ? ._channel . isOpen ( ) ) {
831+ if ( this . _channel ? .isOpen ( ) ) {
846832 this . _channel . sendReceiverAudioSubscriptionMessage ( message ) ;
847833 }
848834 }
@@ -856,7 +842,7 @@ export default class RTC extends Listenable {
856842 public setLastN ( value : number ) : void {
857843 if ( this . _lastN !== value ) {
858844 this . _lastN = value ;
859- if ( this ? ._channel . isOpen ( ) ) {
845+ if ( this . _channel ? .isOpen ( ) ) {
860846 this . _channel . sendSetLastNMessage ( value ) ;
861847 }
862848 this . eventEmitter . emit ( RTCEvents . LASTN_VALUE_CHANGED , value ) ;
0 commit comments