2021-08-11 06:37:47 +00:00
package c.a.q ;
2021-07-24 02:37:17 +00:00
2021-08-11 06:37:47 +00:00
import c.a.q.e ;
2021-08-12 06:36:45 +00:00
import c.a.q.n0.a ;
import c.a.q.o0.d ;
import c.a.q.o0.e ;
2021-08-06 20:07:13 +00:00
import co.discord.media_engine.MediaType ;
import co.discord.media_engine.StreamParameters ;
2021-07-24 02:37:17 +00:00
import com.discord.rtcconnection.EncodeQuality ;
import com.discord.rtcconnection.MediaSinkWantsManager ;
import com.discord.rtcconnection.RtcConnection ;
import com.discord.rtcconnection.VideoMetadata ;
import com.discord.rtcconnection.mediaengine.MediaEngine ;
import com.discord.rtcconnection.mediaengine.MediaEngineConnection ;
import com.discord.rtcconnection.socket.io.Payloads ;
import com.discord.utilities.logging.Logger ;
import d0.t.n ;
import d0.t.o ;
import d0.t.r ;
import d0.t.u ;
import d0.z.d.m ;
import java.util.ArrayList ;
import java.util.Iterator ;
import java.util.LinkedHashMap ;
import java.util.List ;
import java.util.ListIterator ;
import java.util.Map ;
import java.util.NoSuchElementException ;
import java.util.Objects ;
import kotlin.NoWhenBranchMatchedException ;
2021-08-09 22:51:56 +00:00
import org.webrtc.MediaStreamTrack ;
2021-07-24 02:37:17 +00:00
/* compiled from: RtcConnection.kt */
2021-08-03 07:33:18 +00:00
public final class h0 implements a . d {
2021-07-24 02:37:17 +00:00
public final /* synthetic */ RtcConnection a ;
2021-08-03 07:33:18 +00:00
public h0 ( RtcConnection rtcConnection ) {
2021-07-24 02:37:17 +00:00
this . a = rtcConnection ;
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void a ( String str , String str2 ) {
m . checkNotNullParameter ( str , " audioCodec " ) ;
m . checkNotNullParameter ( str2 , " videoCodec " ) ;
MediaEngineConnection mediaEngineConnection = this . a . w ;
if ( mediaEngineConnection ! = null ) {
mediaEngineConnection . r ( str , str2 ) ;
}
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void b ( boolean z2 , Integer num , String str ) {
RtcConnection rtcConnection = this . a ;
Objects . requireNonNull ( rtcConnection ) ;
2021-08-12 06:36:45 +00:00
rtcConnection . r ( " Disconnected from RTC server. wasFatal: " + z2 + " -- code: " + num + " -- reason: " + str ) ;
2021-07-24 02:37:17 +00:00
MediaEngineConnection mediaEngineConnection = rtcConnection . w ;
if ( mediaEngineConnection ! = null ) {
mediaEngineConnection . destroy ( ) ;
}
MediaEngineConnection mediaEngineConnection2 = rtcConnection . w ;
if ( mediaEngineConnection2 ! = null ) {
2021-08-18 06:27:30 +00:00
mediaEngineConnection2 . o ( rtcConnection . M ) ;
}
Long l = rtcConnection . F ;
long currentTimeMillis = l ! = null ? rtcConnection . V . currentTimeMillis ( ) - l . longValue ( ) : 0 ;
boolean z3 = true ;
boolean z4 = currentTimeMillis > 30000 ;
if ( ( num ! = null & & num . intValue ( ) = = 1000 ) | | z4 ) {
z3 = false ;
2021-07-24 02:37:17 +00:00
}
if ( ! ( rtcConnection . r . a instanceof RtcConnection . State . d ) ) {
2021-08-12 06:36:45 +00:00
rtcConnection . n ( z3 , str ) ;
2021-07-24 02:37:17 +00:00
d dVar = rtcConnection . n ;
if ( dVar ! = null ) {
dVar . a ( ) ;
}
rtcConnection . n = null ;
rtcConnection . o = false ;
}
2021-09-04 06:18:33 +00:00
rtcConnection . f2161z = 0 ;
2021-07-24 02:37:17 +00:00
rtcConnection . C = null ;
2021-08-18 06:27:30 +00:00
MediaSinkWantsManager mediaSinkWantsManager = rtcConnection . G ;
2021-07-24 02:37:17 +00:00
if ( mediaSinkWantsManager ! = null ) {
mediaSinkWantsManager . b ( new g ( mediaSinkWantsManager ) ) ;
}
2021-08-12 06:36:45 +00:00
rtcConnection . u ( new RtcConnection . State . d ( z3 ) ) ;
2021-07-24 02:37:17 +00:00
if ( z3 ) {
2021-08-03 07:33:18 +00:00
long fail = rtcConnection . p . fail ( new d0 ( rtcConnection ) ) ;
2021-08-18 06:27:30 +00:00
Logger . w$default ( rtcConnection . U , rtcConnection . k , " Disconnect was not clean! Reason: " + str + " , code: " + num + " . Reconnecting in " + ( fail / ( ( long ) 1000 ) ) + " seconds. " , null , 4 , null ) ;
2021-07-24 02:37:17 +00:00
}
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void c ( String str , List < Integer > list ) {
m . checkNotNullParameter ( str , " mode " ) ;
m . checkNotNullParameter ( list , " secretKey " ) ;
MediaEngineConnection mediaEngineConnection = this . a . w ;
if ( mediaEngineConnection ! = null ) {
mediaEngineConnection . t ( str , u . toIntArray ( list ) ) ;
}
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void d ( String str ) {
m . checkNotNullParameter ( str , " mediaSessionId " ) ;
RtcConnection rtcConnection = this . a ;
2021-08-18 06:27:30 +00:00
rtcConnection . J = str ;
2021-07-24 02:37:17 +00:00
for ( RtcConnection . c cVar : rtcConnection . m ) {
cVar . onMediaSessionIdReceived ( ) ;
2021-08-12 06:36:45 +00:00
rtcConnection . p ( RtcConnection . AnalyticsEvent . MEDIA_SESSION_JOINED , new LinkedHashMap ( ) ) ;
2021-07-24 02:37:17 +00:00
}
}
2021-08-12 06:36:45 +00:00
/* JADX DEBUG: Failed to insert an additional move for type inference into block B:50:0x00a5 */
2021-07-24 02:37:17 +00:00
/* JADX WARN: Multi-variable type inference failed */
2021-08-12 06:36:45 +00:00
/* JADX DEBUG: Type inference failed for r2v2. Raw type applied. Possible types: java.util.Iterator<T>, java.util.Iterator */
/* JADX DEBUG: Type inference failed for r2v6. Raw type applied. Possible types: java.util.Iterator<T>, java.util.Iterator */
2021-07-24 02:37:17 +00:00
/* JADX WARNING: Unknown variable types count: 1 */
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void e ( long j , int i , int i2 , List < Payloads . Stream > list ) {
VideoMetadata videoMetadata ;
Object obj ;
boolean z2 ;
2021-08-12 06:36:45 +00:00
? ? r3 ;
2021-07-24 02:37:17 +00:00
RtcConnection rtcConnection = this . a ;
2021-08-12 06:36:45 +00:00
e eVar = rtcConnection . A ;
long j2 = ( long ) i2 ;
synchronized ( eVar ) {
if ( j2 ! = 0 ) {
eVar . n . put ( Long . valueOf ( j2 ) , Long . valueOf ( eVar . r . currentTimeMillis ( ) ) ) ;
Logger . i$default ( eVar . q , " VideoQuality: handleVideoStreamUpdate(userId: " + j + " , videoSsrc: " + j2 + ')' , null , 2 , null ) ;
}
2021-07-24 02:37:17 +00:00
}
2021-08-18 06:27:30 +00:00
if ( j ! = rtcConnection . S ) {
2021-07-24 02:37:17 +00:00
boolean z3 = false ;
2021-08-18 06:27:30 +00:00
if ( rtcConnection . G ! = null ) {
2021-07-24 02:37:17 +00:00
if ( list ! = null ) {
2021-08-12 06:36:45 +00:00
r3 = new ArrayList ( o . collectionSizeOrDefault ( list , 10 ) ) ;
2021-07-24 02:37:17 +00:00
for ( Payloads . Stream stream : list ) {
2021-08-12 06:36:45 +00:00
r3 . add ( Payloads . Stream . copy$default ( stream , MediaStreamTrack . VIDEO_TRACK_KIND , null , null , null , null , null , null , Boolean . valueOf ( i2 > 0 ) , null , 382 , null ) ) ;
2021-07-24 02:37:17 +00:00
}
} else {
2021-08-12 06:36:45 +00:00
r3 = n . emptyList ( ) ;
2021-07-24 02:37:17 +00:00
}
2021-08-12 06:36:45 +00:00
boolean isEmpty = r3 . isEmpty ( ) ;
List list2 = r3 ;
2021-07-24 02:37:17 +00:00
if ( isEmpty ) {
Integer valueOf = Integer . valueOf ( i2 ) ;
Integer valueOf2 = Integer . valueOf ( i2 + 1 ) ;
if ( i2 > 0 ) {
z3 = true ;
}
2021-08-09 22:51:56 +00:00
list2 = d0 . t . m . listOf ( new Payloads . Stream ( MediaStreamTrack . VIDEO_TRACK_KIND , " 100 " , null , 100 , valueOf , valueOf2 , null , Boolean . valueOf ( z3 ) , null ) ) ;
2021-07-24 02:37:17 +00:00
}
2021-08-18 06:27:30 +00:00
rtcConnection . G . c ( j , Long . valueOf ( ( long ) i ) ) ;
MediaSinkWantsManager mediaSinkWantsManager = rtcConnection . G ;
2021-07-24 02:37:17 +00:00
Objects . requireNonNull ( mediaSinkWantsManager ) ;
m . checkNotNullParameter ( list2 , " ssrcs " ) ;
mediaSinkWantsManager . b ( new l ( mediaSinkWantsManager , list2 , j ) ) ;
return ;
}
if ( list ! = null ) {
Iterator it = list . iterator ( ) ;
while ( true ) {
if ( ! it . hasNext ( ) ) {
obj = null ;
break ;
}
obj = it . next ( ) ;
Payloads . Stream stream2 = ( Payloads . Stream ) obj ;
Integer ssrc = stream2 . getSsrc ( ) ;
if ( ssrc = = null | | ssrc . intValue ( ) ! = i2 | | stream2 . getMaxResolution ( ) = = null ) {
z2 = false ;
continue ;
} else {
z2 = true ;
continue ;
}
if ( z2 ) {
break ;
}
}
Payloads . Stream stream3 = ( Payloads . Stream ) obj ;
if ( stream3 ! = null ) {
Payloads . Stream . MaxResolution maxResolution = stream3 . getMaxResolution ( ) ;
m . checkNotNull ( maxResolution ) ;
videoMetadata = new VideoMetadata ( j , maxResolution . getWidth ( ) , stream3 . getMaxResolution ( ) . getHeight ( ) , stream3 . getMaxFrameRate ( ) , stream3 . getMaxResolution ( ) . getType ( ) ) ;
2021-08-12 06:36:45 +00:00
rtcConnection . d ( j , ( long ) i , j2 , videoMetadata ) ;
2021-07-24 02:37:17 +00:00
}
}
videoMetadata = null ;
2021-08-12 06:36:45 +00:00
rtcConnection . d ( j , ( long ) i , j2 , videoMetadata ) ;
2021-07-24 02:37:17 +00:00
}
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void f ( Map < String , Integer > map ) {
boolean z2 ;
Integer num ;
m . checkNotNullParameter ( map , " wants " ) ;
RtcConnection rtcConnection = this . a ;
2021-08-18 06:27:30 +00:00
if ( rtcConnection . G ! = null ) {
long j = rtcConnection . K ;
2021-07-24 02:37:17 +00:00
int intValue = ( j = = 0 | | ( num = map . get ( String . valueOf ( j ) ) ) = = null ) ? 0 : num . intValue ( ) ;
Integer num2 = map . get ( " any " ) ;
int intValue2 = num2 ! = null ? num2 . intValue ( ) : 0 ;
if ( intValue < = 0 ) {
intValue = intValue2 > 0 ? intValue2 : 100 ;
}
e . c cVar = null ;
2021-08-18 06:27:30 +00:00
rtcConnection . U . i ( rtcConnection . k , " remote MediaSinkWants: " + map + " , decided on encode quality " + intValue , null ) ;
2021-07-24 02:37:17 +00:00
EncodeQuality [ ] values = EncodeQuality . values ( ) ;
for ( int i = 10 ; i > = 0 ; i - - ) {
EncodeQuality encodeQuality = values [ i ] ;
if ( encodeQuality . getValue ( ) < = intValue ) {
2021-08-18 06:27:30 +00:00
e eVar = rtcConnection . G . j ;
2021-08-12 06:36:45 +00:00
j0 j0Var = eVar . e ;
2021-07-24 02:37:17 +00:00
m . checkNotNullParameter ( encodeQuality , " wantValue " ) ;
List < e . c > list = eVar . d ;
ListIterator < e . c > listIterator = list . listIterator ( list . size ( ) ) ;
while ( true ) {
if ( ! listIterator . hasPrevious ( ) ) {
break ;
}
e . c previous = listIterator . previous ( ) ;
2021-08-28 06:29:07 +00:00
if ( encodeQuality . compareTo ( previous . f214c ) > = 0 ) {
2021-07-24 02:37:17 +00:00
z2 = true ;
continue ;
} else {
z2 = false ;
continue ;
}
if ( z2 ) {
cVar = previous ;
break ;
}
}
e . c cVar2 = cVar ;
if ( cVar2 = = null ) {
cVar2 = ( e . c ) u . first ( ( List < ? extends Object > ) eVar . d ) ;
}
n nVar = cVar2 . a ;
2021-08-28 06:29:07 +00:00
int max = Math . max ( ( int ) ( ( ( double ) j0Var . f215c . a ) * nVar . f225c ) , j0Var . d ) ;
int max2 = Math . max ( ( int ) ( ( ( double ) j0Var . f215c . b ) * nVar . f225c ) , j0Var . d ) ;
2021-07-24 02:37:17 +00:00
MediaEngineConnection mediaEngineConnection = rtcConnection . w ;
if ( mediaEngineConnection ! = null ) {
mediaEngineConnection . m ( new MediaEngineConnection . b ( max , max2 , nVar . a , nVar . b , nVar . d , nVar . e ) ) ;
return ;
}
return ;
}
}
throw new NoSuchElementException ( " Array contains no element matching the predicate. " ) ;
}
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void g ( long j ) {
RtcConnection rtcConnection = this . a ;
rtcConnection . u . add ( Long . valueOf ( j ) ) ;
if ( rtcConnection . u . size ( ) > 5 ) {
r . removeFirst ( rtcConnection . u ) ;
}
if ( j > ( ( long ) 500 ) ) {
2021-09-04 06:18:33 +00:00
rtcConnection . f2161z + + ;
2021-07-24 02:37:17 +00:00
}
double d = ( double ) j ;
Objects . requireNonNull ( RtcConnection . Quality . Companion ) ;
RtcConnection . Quality quality = Double . isNaN ( d ) ? RtcConnection . Quality . UNKNOWN : d < ( ( double ) 250 ) ? RtcConnection . Quality . FINE : d < ( ( double ) 500 ) ? RtcConnection . Quality . AVERAGE : RtcConnection . Quality . BAD ;
for ( RtcConnection . c cVar : rtcConnection . m ) {
cVar . onQualityUpdate ( quality ) ;
}
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void h ( ) {
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void i ( ) {
RtcConnection rtcConnection = this . a ;
rtcConnection . p . cancel ( ) ;
2021-08-18 06:27:30 +00:00
rtcConnection . U . recordBreadcrumb ( " Connected to RTC server. " , rtcConnection . k ) ;
2021-07-24 02:37:17 +00:00
a aVar = rtcConnection . v ;
if ( aVar = = null ) {
2021-08-12 06:36:45 +00:00
RtcConnection . o ( rtcConnection , " onSocketConnect() socket was null. " , null , null , 6 ) ;
2021-07-24 02:37:17 +00:00
return ;
}
2021-08-09 22:51:56 +00:00
List listOf = d0 . t . m . listOf ( new Payloads . Stream ( MediaStreamTrack . VIDEO_TRACK_KIND , " 100 " , null , 100 , null , null , null , null , null ) ) ;
2021-08-18 06:27:30 +00:00
String str = rtcConnection . R ;
long j = rtcConnection . S ;
String str2 = rtcConnection . P ;
boolean z2 = rtcConnection . Q ;
2021-07-24 02:37:17 +00:00
m . checkNotNullParameter ( str , " serverId " ) ;
m . checkNotNullParameter ( str2 , " sessionId " ) ;
2021-08-06 20:07:13 +00:00
m . checkNotNullParameter ( listOf , " streams " ) ;
2021-09-07 06:52:02 +00:00
aVar . G . a ( ) ;
2021-08-28 06:29:07 +00:00
aVar . f226s = str ;
2021-07-24 02:37:17 +00:00
aVar . t = str2 ;
aVar . A = a . c . IDENTIFYING ;
2021-09-07 06:52:02 +00:00
aVar . n ( 0 , new Payloads . Identify ( str , j , str2 , aVar . D , z2 , listOf ) ) ;
2021-08-12 06:36:45 +00:00
rtcConnection . u ( RtcConnection . State . a . a ) ;
2021-07-24 02:37:17 +00:00
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void j ( long j ) {
Map < String , Object > b ;
RtcConnection rtcConnection = this . a ;
2021-08-18 06:27:30 +00:00
if ( ( rtcConnection . W instanceof RtcConnection . d . a ) & & ( b = rtcConnection . A . b ( String . valueOf ( j ) ) ) ! = null ) {
2021-08-12 06:36:45 +00:00
rtcConnection . l ( j , b ) ;
2021-07-24 02:37:17 +00:00
}
2021-08-18 06:27:30 +00:00
MediaSinkWantsManager mediaSinkWantsManager = rtcConnection . G ;
2021-07-24 02:37:17 +00:00
if ( mediaSinkWantsManager ! = null ) {
mediaSinkWantsManager . c ( j , null ) ;
}
2021-08-18 06:27:30 +00:00
MediaSinkWantsManager mediaSinkWantsManager2 = rtcConnection . G ;
2021-07-24 02:37:17 +00:00
if ( mediaSinkWantsManager2 ! = null ) {
List emptyList = n . emptyList ( ) ;
m . checkNotNullParameter ( emptyList , " ssrcs " ) ;
mediaSinkWantsManager2 . b ( new l ( mediaSinkWantsManager2 , emptyList , j ) ) ;
}
}
2021-08-06 20:07:13 +00:00
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARNING: Unknown variable types count: 1 */
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-08-06 20:07:13 +00:00
public void k ( int i , int i2 , String str , List < Payloads . Stream > list ) {
2021-07-24 02:37:17 +00:00
MediaEngineConnection . Type type ;
m . checkNotNullParameter ( str , " ip " ) ;
2021-08-06 20:07:13 +00:00
m . checkNotNullParameter ( list , " streams " ) ;
2021-07-24 02:37:17 +00:00
RtcConnection rtcConnection = this . a ;
Objects . requireNonNull ( rtcConnection ) ;
2021-08-12 06:36:45 +00:00
rtcConnection . r ( " Discovered dedicated UDP server on port " + i ) ;
rtcConnection . u ( RtcConnection . State . g . a ) ;
2021-08-06 20:07:13 +00:00
ArrayList arrayList = new ArrayList ( o . collectionSizeOrDefault ( list , 10 ) ) ;
for ( Iterator it = list . iterator ( ) ; it . hasNext ( ) ; it = it ) {
Payloads . Stream stream = ( Payloads . Stream ) it . next ( ) ;
2021-08-09 22:51:56 +00:00
MediaType mediaType = MediaStreamTrack . VIDEO_TRACK_KIND . equals ( stream . getType ( ) ) ? MediaType . Video : MediaType . Audio ;
2021-08-06 20:07:13 +00:00
String rid = stream . getRid ( ) ;
2021-08-17 07:10:14 +00:00
if ( rid = = null ) {
rid = " " ;
}
2021-08-06 20:07:13 +00:00
Integer ssrc = stream . getSsrc ( ) ;
int intValue = ssrc ! = null ? ssrc . intValue ( ) : 0 ;
Integer rtxSsrc = stream . getRtxSsrc ( ) ;
int intValue2 = rtxSsrc ! = null ? rtxSsrc . intValue ( ) : 0 ;
Boolean active = stream . getActive ( ) ;
boolean booleanValue = active ! = null ? active . booleanValue ( ) : false ;
Integer maxBitrate = stream . getMaxBitrate ( ) ;
int intValue3 = maxBitrate ! = null ? maxBitrate . intValue ( ) : 0 ;
Integer quality = stream . getQuality ( ) ;
arrayList . add ( new StreamParameters ( mediaType , rid , intValue , intValue2 , booleanValue , intValue3 , quality ! = null ? quality . intValue ( ) : 100 , 0 ) ) ;
}
boolean isEmpty = arrayList . isEmpty ( ) ;
ArrayList arrayList2 = arrayList ;
if ( isEmpty ) {
arrayList2 = d0 . t . m . listOf ( new StreamParameters ( MediaType . Video , " 100 " , i2 + 1 , i2 + 2 , false , 0 , 100 , 0 ) ) ;
}
2021-08-18 06:27:30 +00:00
MediaEngine mediaEngine = rtcConnection . T ;
long j = rtcConnection . S ;
2021-08-06 20:07:13 +00:00
MediaEngine . a aVar = new MediaEngine . a ( i2 , str , i , arrayList2 ) ;
2021-08-18 06:27:30 +00:00
RtcConnection . d dVar = rtcConnection . W ;
2021-07-24 02:37:17 +00:00
if ( m . areEqual ( dVar , RtcConnection . d . a . a ) ) {
type = MediaEngineConnection . Type . DEFAULT ;
} else if ( dVar instanceof RtcConnection . d . b ) {
type = MediaEngineConnection . Type . STREAM ;
} else {
throw new NoWhenBranchMatchedException ( ) ;
}
2021-08-03 07:33:18 +00:00
MediaEngineConnection g = mediaEngine . g ( j , aVar , type , new e0 ( rtcConnection ) ) ;
2021-07-24 02:37:17 +00:00
if ( g = = null ) {
2021-08-12 06:36:45 +00:00
RtcConnection . o ( rtcConnection , " onSocketHello(): connect() return null. " , null , null , 6 ) ;
2021-07-24 02:37:17 +00:00
return ;
}
2021-08-18 06:27:30 +00:00
g . l ( rtcConnection . M ) ;
2021-07-24 02:37:17 +00:00
rtcConnection . w = g ;
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void onConnecting ( ) {
RtcConnection rtcConnection = this . a ;
rtcConnection . p . cancel ( ) ;
StringBuilder sb = new StringBuilder ( ) ;
sb . append ( " Connecting to RTC server " ) ;
a aVar = rtcConnection . v ;
sb . append ( aVar ! = null ? aVar . C : null ) ;
2021-08-12 06:36:45 +00:00
rtcConnection . r ( sb . toString ( ) ) ;
rtcConnection . u ( RtcConnection . State . c . a ) ;
2021-07-24 02:37:17 +00:00
}
2021-08-12 06:36:45 +00:00
@Override // c.a.q.n0.a.d
2021-07-24 02:37:17 +00:00
public void onSpeaking ( long j , int i , boolean z2 ) {
RtcConnection rtcConnection = this . a ;
2021-08-18 06:27:30 +00:00
if ( j ! = rtcConnection . S ) {
2021-07-24 02:37:17 +00:00
MediaEngineConnection mediaEngineConnection = rtcConnection . w ;
if ( mediaEngineConnection ! = null ) {
mediaEngineConnection . s ( j , i , null , rtcConnection . g ( j ) , rtcConnection . h ( j ) ) ;
}
2021-08-18 06:27:30 +00:00
MediaSinkWantsManager mediaSinkWantsManager = rtcConnection . G ;
2021-07-24 02:37:17 +00:00
if ( mediaSinkWantsManager ! = null ) {
mediaSinkWantsManager . c ( j , Long . valueOf ( ( long ) i ) ) ;
}
for ( RtcConnection . c cVar : rtcConnection . m ) {
cVar . onUserCreated ( rtcConnection , j ) ;
}
}
}
}