package Ġco . net guru . video chat guru Ċ Ċ import Ġco . net guru . video chat guru . util . Logger Ċ import Ġorg . webrtc . Ice Candidate Ċ import Ġorg . webrtc . Media Stream Ċ import Ġorg . webrtc . Peer Connection ĊĊ Ċ internal Ġclass ĠVideo Peer Connection Observer ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġpeer Connection Listener : ĠPeer Connection Listener , ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġremote Video Listener : ĠRemote Video Listener ) Ġ: ĠCustom Peer Connection Observer Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġval ĠTAG Ġ= ĠVideo Peer Connection Observer :: class . java . simple Name ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Ice Candidate ( ice Candidate : ĠI ce Candidate ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Ice Candidate ( ice Candidate ) ĊĠĠĠĠĠĠĠ Ġpeer Connection Listener . on Ice Candidate ( ice Candidate ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠDescri bes Ġconnection Ġstate ĊĠĠĠĠ Ġ* Ġ@ see Ġ< a Ġhref =" http :// w 3 c . github . io / webrtc - pc /# rtc ice connection state - enum "> http :// w 3 c . github . io / webrtc - pc /# rtc ice connection state - enum </ a > ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġoverride Ġfun Ġon Ice Connection Change ( ice Connection State : ĠPeer Connection . Ice Connection State ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Ice Connection Change ( ice Connection State ) ĊĠĠĠĠĠĠĠ Ġpeer Connection Listener . on Ice Connection Change ( ice Connection State ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Ice Candidates Removed ( ice Candidates : ĠArray < Ice Candidate >) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Ice Candidates Removed ( ice Candidates ) ĊĠĠĠĠĠĠĠ Ġpeer Connection Listener . on Ice Candidates Removed ( ice Candidates ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Add Stream ( media Stream : ĠMedia Stream ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Add Stream ( media Stream ) ĊĠĠĠĠĠĠĠ Ġif Ġ( media Stream . audio Tracks . size Ġ> Ġ 1 Ġ|| Ġmedia Stream . video Tracks . size Ġ> Ġ 1 ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLogger . e ( TAG , Ġ" We ird - looking Ġstream : Ġ$ media Stream ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġif Ġ( media Stream . video Tracks . size Ġ== Ġ 1 ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmedia Stream . pre served Video Tracks ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġremote Video Track Ġ= Ġmedia Stream . video Tracks . first ĊĠĠĠĠĠĠĠĠĠĠĠ Ġremote Video Listener . on Add Remote Video Stream ( remote Video Track ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Remove Stream ( media Stream : ĠMedia Stream ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Remove Stream ( media Stream ) ĊĠĠĠĠĠĠĠ Ġremote Video Listener . remove Video Stream () ĊĠĠĠ Ġ} Ċ }