I want to control the volume using the audio tag on ios.

Asked 2 years ago, Updated 2 years ago, 97 views

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;

javascript monaca html5

2022-09-30 20:14

1 Answers

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.


2022-09-30 20:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.