File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' livekit-client ' : patch
3+ ---
4+
5+ Skip pre-populated media sections for single peer connections on React Native
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ import type { LoggerOptions } from './types';
9292import {
9393 Future ,
9494 isPublisherOfferWithJoinSupported ,
95+ isReactNative ,
9596 isVideoCodec ,
9697 isVideoTrack ,
9798 isWeb ,
@@ -857,7 +858,15 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
857858 */
858859 private applyInitialPublisherLayout ( ) {
859860 this . createDataChannels ( ) ;
860- this . addMediaSections ( initialMediaSectionsAudio , initialMediaSectionsVideo ) ;
861+ /**
862+ * Native libwebrtc does not support pre-populating the media sections,
863+ * so we skip it for React Native.
864+ *
865+ * Related: https://github.com/livekit/rust-sdks/pull/1151
866+ */
867+ if ( ! isReactNative ( ) ) {
868+ this . addMediaSections ( initialMediaSectionsAudio , initialMediaSectionsVideo ) ;
869+ }
861870 }
862871
863872 private addMediaSections ( numAudios : number , numVideos : number ) {
You can’t perform that action at this time.
0 commit comments