hirbod / react-native-volume-manager

React Native module which adds the ability to change the system volume on iOS and Android, listen to volume changes and supress the native volume UI to build your own volume slider or UX. It can listen to iOS mute switch and ringer mode changes on Android (and let you set the ringer mode)
MIT License
216 stars 13 forks source link

AirPlay Icon on Top Left of the Application #10

Closed Mattefarax closed 1 year ago

Mattefarax commented 1 year ago

Hello, when I execute the function setVolume on iOS, in the Top Left of my application show up an AirPlay Icon white that i can't remove. What can i do to fix this problem? GitHub Issue

hirbod commented 1 year ago

That is very weird. Which iOS Version?

Mattefarax commented 1 year ago

15.7 and 16.2

Sewb21 commented 1 year ago

I also have noticed this too

Sewb21 commented 1 year ago

@hirbod I added a potential fix on my local project which seemed to work but I've been unable to test the example project on a device due to signing issues and I don't think this issue appears on the sim.

An initial fix I tried was explicitly hiding the route button (https://developer.apple.com/documentation/mediaplayer/mpvolumeview/1620075-showsroutebutton) but that method is deprecated it hid the AirPlay icon but seemed to show another random circle icon (image attached). I could hide this with showsVolumeSlider but this broke the showNativeUI functionality.

The fix that seems to work fine is adding volumeView.transform = CGAffineTransformMakeScale(0.1, 0.1);, after the view is initialized, to scale down the icons. I think it would just need testing on the example app on a real device to make sure it works as expected but not too sure how to deal with the signing error.

No profiles for 'com.hirbod.rnvme' were found. Xcode couldn't find any iOS App Development provisioning profiles matching 'com.hirbod.rnvme'.

IMG_1663

hirbod commented 1 year ago

@Sewb21 you'll need to open the example in XCode and change that value. I'll optimize the example soon. I'll have a look at the issue this weekend.

hirbod commented 1 year ago

I have found a proper fix for this. Will release in an hour

hirbod commented 1 year ago

Version 1.3.0 has been released. This issue is resolved now.