In my Meteor React App, I have made some modifications to the React Howler plugin in order to play two audio tracks simultaneously. I have also added a crossfader feature to adjust the volume of both tracks at the same time. This functionality works perfectly in Chrome and on Android devices. However, upon testing it on iOS, I noticed that although the audio plays without any issues, the volume adjustment does not take effect.
An interesting observation is that when I check the volume values at each time interval (the player updates 10 times per second), the values displayed are correct across all platforms. This indicates that the volume is indeed being set and stored correctly on iOS, but the actual audible volume remains unchanged.
Below is a snippet of the volume control functions in my customized version of ReactHowler:
get volume() {
return this._howler.volume();
}
set volume(val) {
if(this._howler.volume() !== val){
console.log("setting volume to " + val)
}
this._howler.volume(val);
}
The console output appears as expected, showing the volume being set to the desired value when the crossfader is adjusted:
setting volume to 0.35
howler volume: 0.35 (this is output at every time frame for debugging purposes)
howler volume: 0.35
...