@@ -14,8 +14,6 @@ export class CapabilitiesSubscriber {
1414 private _callIdRef : CallIdRef ;
1515 private _context : CallContext ;
1616 private _capabilitiesFeature : CapabilitiesFeature ;
17- /* @conditional -compile-remove(media-access) */
18- private _capabilitiesInitialized : boolean = false ;
1917
2018 constructor ( callIdRef : CallIdRef , context : CallContext , capabilities : CapabilitiesFeature ) {
2119 this . _callIdRef = callIdRef ;
@@ -40,19 +38,12 @@ export class CapabilitiesSubscriber {
4038 }
4139 /* @conditional -compile-remove(media-access) */
4240 this . setUnmuteMicAndTurnVideoOnNotification ( data ) ;
43-
44- /* @conditional -compile-remove(media-access) */
45- this . _capabilitiesInitialized = true ;
4641 } ;
4742
4843 /* @conditional -compile-remove(media-access) */
4944 private setUnmuteMicAndTurnVideoOnNotification = ( data : CapabilitiesChangeInfo ) : void => {
5045 if ( data . oldValue . turnVideoOn ?. isPresent !== data . newValue . turnVideoOn ?. isPresent ) {
51- if (
52- data . oldValue . turnVideoOn ?. isPresent === false &&
53- data . newValue . turnVideoOn ?. isPresent &&
54- this . _capabilitiesInitialized
55- ) {
46+ if ( data . oldValue . turnVideoOn ?. isPresent === false && data . newValue . turnVideoOn ?. isPresent ) {
5647 const capabilityTurnVideoOnAbsent = this . _context . getState ( ) . latestNotifications . capabilityTurnVideoOnAbsent ;
5748 if ( capabilityTurnVideoOnAbsent ) {
5849 this . _context . deleteLatestNotification ( this . _callIdRef . callId , 'capabilityTurnVideoOnAbsent' ) ;
@@ -81,11 +72,7 @@ export class CapabilitiesSubscriber {
8172 }
8273 }
8374 if ( data . oldValue . unmuteMic ?. isPresent !== data . newValue . unmuteMic ?. isPresent ) {
84- if (
85- data . oldValue . unmuteMic ?. isPresent === false &&
86- data . newValue . unmuteMic ?. isPresent &&
87- this . _capabilitiesInitialized
88- ) {
75+ if ( data . oldValue . unmuteMic ?. isPresent === false && data . newValue . unmuteMic ?. isPresent ) {
8976 const capabilityUnmuteMicAbsent = this . _context . getState ( ) . latestNotifications . capabilityUnmuteMicAbsent ;
9077 if ( capabilityUnmuteMicAbsent ) {
9178 this . _context . deleteLatestNotification ( this . _callIdRef . callId , 'capabilityUnmuteMicAbsent' ) ;
0 commit comments