David Liu

remove duplicate code

@@ -206,26 +206,6 @@ constructor( @@ -206,26 +206,6 @@ constructor(
206 lossyInit 206 lossyInit
207 ) 207 )
208 lossyDataChannel!!.registerObserver(this) 208 lossyDataChannel!!.registerObserver(this)
209 -  
210 - coroutineScope.launch {  
211 - val sdpOffer =  
212 - when (val outcome = publisher.peerConnection.createOffer(getPublisherOfferConstraints())) {  
213 - is Either.Left -> outcome.value  
214 - is Either.Right -> {  
215 - Timber.d { "error creating offer: ${outcome.value}" }  
216 - return@launch  
217 - }  
218 - }  
219 -  
220 - when (val outcome = publisher.peerConnection.setLocalDescription(sdpOffer)) {  
221 - is Either.Right -> {  
222 - Timber.d { "error setting local description: ${outcome.value}" }  
223 - return@launch  
224 - }  
225 - }  
226 -  
227 - client.sendOffer(sdpOffer)  
228 - }  
229 } 209 }
230 210
231 suspend fun addTrack( 211 suspend fun addTrack(