Closed Ilario17 closed 5 years ago
Hi! Thanks for the report.
The sound starts but if the phone has the minimum volume setVolume does not affect. I would like to have the possibility to play the sound even if the user set the phone volume to 0
This is the expected behavior of setVolume()
.
There is a setSystemVolume()
function on Android but on iOS there is only getSystemVolume()
. Out of curiosity, can you see what that returns?
From some searching, it looks like MPVolumeView
is the way to set system volume on iOS.
Some possible solutions for React Native:
Thank you for your answer, I'll try the libraries listed
setVolume
is therefore used to set the volume of the audio and not that of the phone, right?
setVolume
is therefore used to set the volume of the audio and not that of the phone, right?
Yes, on iOS according to the docs:
Use this property to control an audio player’s volume relative to other audio output.
I'd really welcome a pull request to add that to the readme! Could probably be a couple sentences in the code sample.
I tried setVolume(1) and nothing has changed.
The sound starts but if the phone has the minimum volume setVolume does not affect. I would like to have the possibility to play the sound even if the user set the phone volume to 0
react-native-sound version: 0.11.0 react-native version: 0.58.4
tested on iPhone XR iOS 12.2