I want to control the volume by using volume in the audio tag.
It can be controlled by a web browser, but not by a terminal (ios).
I tried the volume between 0.0 and 1.0, but there is no difference in the volume.
The development environment is monaca (https://ja.monaca.io/.
I would appreciate it if you could tell me how to solve this problem.
Thank you for your cooperation.
//Read audio
varaudio=newAudio("se/sound.mp3");
// set attribute values
audio.loop = 'true';
// Play audio
audio.play();
// Voice Volume Control
audio.volume = 0.1;
For iOS 6 or later, the Web Audio API, including AudioContext
, is likely to work.
http://www.html5rocks.com/ja/tutorials/webaudio/intro/
There was just a demo of volume control in this article, and it worked on my iPad.
© 2024 OneMinuteCode. All rights reserved.