@@ -47,7 +47,7 @@ public class Room : JSEventEmitter<RoomEvent>, IDisposable
4747 public delegate void TrackStreamStateChangedDelegate ( RemoteTrackPublication publication , TrackStreamState streamState , RemoteParticipant participant ) ;
4848 public delegate void TrackSubscriptionPermissionChangedDelegate ( RemoteTrackPublication publication , SubscriptionStatus status , RemoteParticipant participant ) ;
4949 public delegate void AudioPlaybackChangedDelegate ( bool playing ) ;
50-
50+
5151 public event ReconnectingDelegate Reconnecting ;
5252 public event ReconnectedDelegate Reconnected ;
5353 public event DisconnectedDelegate Disconnected ;
@@ -83,7 +83,7 @@ private static void EventReceived(IntPtr iptr)
8383 try
8484 {
8585 var room = Acquire < Room > ( JSNative . GetFunctionInstance ( ) ) ;
86-
86+
8787 switch ( evRef . Event )
8888 {
8989 case RoomEvent . Reconnecting :
@@ -100,7 +100,7 @@ private static void EventReceived(IntPtr iptr)
100100 DisconnectReason ? reason = null ;
101101 if ( JSNative . IsNumber ( pPtr ) )
102102 reason = ( DisconnectReason ? ) JSNative . GetNumber ( pPtr ) ;
103-
103+
104104 Log . Debug ( $ "Room: Received Disconnected({ reason } )") ;
105105 room . Disconnected ? . Invoke ( reason ) ;
106106 break ;
@@ -210,7 +210,7 @@ private static void EventReceived(IntPtr iptr)
210210 string metadata = null ;
211211 if ( JSNative . IsString ( mdPtr ) )
212212 metadata = JSNative . GetString ( mdPtr ) ;
213-
213+
214214 var participant = Acquire < Participant > ( JSNative . ShiftStack ( ) ) ;
215215 Log . Debug ( $ "Room: Received ParticipantMetadataChanged(\" { metadata } \" , { participant . Sid } )") ;
216216 room . ParticipantMetadataChanged ? . Invoke ( metadata , participant ) ;
@@ -243,7 +243,7 @@ private static void EventReceived(IntPtr iptr)
243243 DataPacketKind ? kind = null ;
244244 if ( JSNative . IsNumber ( kindPtr ) )
245245 kind = ( DataPacketKind ? ) JSNative . GetNumber ( kindPtr ) ;
246-
246+
247247 Log . Debug ( $ "Room: Received DataReceived({ data } , { participant ? . Sid } , { kind } )") ;
248248 room . DataReceived ? . Invoke ( data . ToArray ( ) , participant , kind ) ;
249249 break ;
@@ -301,7 +301,7 @@ private static void EventReceived(IntPtr iptr)
301301 Log . Error ( $ "Error happened on RoomEvent.{ evRef . Event } ( Is your listeners working correctly ? ): { Environment . NewLine } { e . Message } ") ;
302302 }
303303 }
304-
304+
305305 public bool IsClosed
306306 {
307307 get
@@ -310,7 +310,7 @@ public bool IsClosed
310310 return JSNative . GetBoolean ( JSNative . GetProperty ( NativeHandle ) ) ;
311311 }
312312 }
313-
313+
314314 public ConnectionState State
315315 {
316316 get
@@ -340,7 +340,7 @@ public JSArray<Participant> ActiveSpeakers
340340
341341 public string Sid
342342 {
343- get
343+ get
344344 {
345345 JSNative . PushString ( "sid" ) ;
346346 return JSNative . GetString ( JSNative . GetProperty ( NativeHandle ) ) ;
@@ -428,26 +428,26 @@ public static JSPromise<JSArray<MediaDeviceInfo>> GetLocalDevices(MediaDeviceKin
428428 JSNative . PushString ( Utils . ToEnumString ( kind . Value ) ) ;
429429 else
430430 JSNative . PushUndefined ( ) ;
431-
431+
432432 if ( requestPermissions . HasValue )
433433 JSNative . PushBoolean ( requestPermissions . Value ) ;
434-
434+
435435 return Acquire < JSPromise < JSArray < MediaDeviceInfo > > > ( JSNative . CallMethod ( roomClazz , "getLocalDevices" ) ) ;
436436 }
437437
438438 private void RegisterEvents ( )
439439 {
440440 foreach ( var e in Enum . GetValues ( typeof ( RoomEvent ) ) )
441441 SetListener ( ( RoomEvent ) e , EventReceived ) ;
442-
442+
443443 SetKeepAlive ( LocalParticipant , true ) ;
444-
444+
445445 ParticipantConnected += ( p ) => SetKeepAlive ( p , true ) ;
446446 ParticipantDisconnected += ( p ) => SetKeepAlive ( p , false ) ;
447-
447+
448448 LocalTrackPublished += ( publication , participant ) => SetKeepAlive ( publication . Track , true ) ;
449449 LocalTrackUnpublished += ( publication , participant ) => SetKeepAlive ( publication . Track , false ) ;
450-
450+
451451 TrackSubscribed += ( track , publication , participant ) => SetKeepAlive ( track , true ) ;
452452 TrackUnsubscribed += ( track , publication , participant ) => SetKeepAlive ( track , false ) ;
453453 }
@@ -468,7 +468,7 @@ public void Dispose()
468468 Dispose ( true ) ;
469469 GC . SuppressFinalize ( this ) ;
470470 }
471-
471+
472472 public void Disconnect ( bool stopTracks = true )
473473 {
474474 JSNative . PushBoolean ( stopTracks ) ;
@@ -482,7 +482,7 @@ public Participant GetParticipantByIdentity(string identity)
482482 var ptr = JSNative . CallMethod ( NativeHandle , "getParticipantByIdentity" ) ;
483483 if ( ! JSNative . IsObject ( ptr ) )
484484 return null ;
485-
485+
486486 return Acquire < Participant > ( ptr ) ;
487487 }
488488
0 commit comments