Date: Tue, 19 Mar 2024 10:17:07 +0100 (CET) Message-ID: <241108151.45261.1710839827018@docs.flashphoner.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_45260_5621543.1710839827018" ------=_Part_45260_5621543.1710839827018 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Due to the bug 17292753 me= ntioned here it is impossible to mute playback volume using devic= e hardware buttons. The following methods are added since build <= span style=3D"color: rgb(26,26,26);">2.6.26 to mute
[[FPWCSApi2 getAud= ioManager] muteAudio];=20
and unmute audio playback
[[FPWCSApi2 getAud= ioManager] unmuteAudio];=20
It is necessary to subscribe to voluem change events to workarond the bu= g and allow to mute sound with hardware buttons (code)
[[NSNotificationCe= nter defaultCenter] addObserver:self selector:@selector(volumeChanged:) nam= e:@"AVSystemController_SystemVolumeDidChangeNotification" object:nil];=20
and mute audio when current volume value reaches the certain value, and = unmute when this value is exceeded (code)
- (void)volumeChan= ged:(NSNotification *)notification { float volume =3D [[[notification userInfo] objectForKey:@"AVSystemController_AudioVolumeNotificationParameter"] floatValue]; =20 currentVolume =3D volume; =20 if (volume <=3D 0.0625) { [[FPWCSApi2 getAudioManager] muteAudio]; } else { [[FPWCSApi2 getAudioManager] unmuteAudio]; } =20 }=20