@@ -611,6 +611,7 @@ export class VideoRoomComponent implements OnInit, OnDestroy {
611611 this . publishSession ( this . localUsers [ 0 ] ) . then ( ( ) => {
612612 this . sendSignalUserChanged ( this . localUsers [ 0 ] , true ) ;
613613 this . joinSession . emit ( ) ;
614+ this . overrideHandRaisedUsers ( ) ;
614615 } )
615616 . catch ( ( error ) => console . error ( error ) ) ;
616617 this . localUsers [ 0 ] . getStreamManager ( ) . on ( 'streamPlaying' , ( ) => {
@@ -620,7 +621,9 @@ export class VideoRoomComponent implements OnInit, OnDestroy {
620621 } else {
621622 this . localUsers [ 0 ] . setVideoActive ( false ) ;
622623 this . localUsers [ 0 ] . setAudioActive ( false ) ;
624+ this . localUsers [ 0 ] . setScreenShareActive ( false ) ;
623625 this . sendSignalUserChanged ( this . localUsers [ 0 ] , true ) ;
626+ this . overrideHandRaisedUsers ( ) ;
624627 }
625628 }
626629
@@ -724,6 +727,17 @@ export class VideoRoomComponent implements OnInit, OnDestroy {
724727 this . handsRaisedMessage = ( this . handsRaised . length > 1 ? 'And ' + ( this . handsRaised . length - 1 ) + ' other ' + ( this . handsRaised . length === 2 ? 'person' : 'people' ) + ' are' : 'Is' ) + ' raising their hand'
725728 }
726729
730+ private overrideHandRaisedUsers ( ) {
731+ this . roomService . getHandRaisedUsers ( this . mySessionId ) . subscribe (
732+ ( users ) => {
733+ users . forEach ( ( user , index ) => {
734+ this . handsRaised [ index ] = user ;
735+ } ) ;
736+ } ,
737+ error => console . log ( error )
738+ ) ;
739+ }
740+
727741 private subscribedToStreamDestroyed ( ) {
728742 this . session . on ( 'streamDestroyed' , ( event : StreamEvent ) => {
729743 this . deleteRemoteStream ( event . stream ) ;
0 commit comments