I am using HTML5 Audio object in javascript with phonegap for iOS.
(我在带有iOS的phonegap的javascript中使用HTML5音频对象。)
It's working fine in Android but I am not able to change volume of audio.(在Android中运行正常,但我无法更改音频音量。)
I am using phonegap build to build this app.(我正在使用phonegap构建来构建此应用。)
My target platforms are android ( equal or greater than 4 ) and ios ( equal or greater than 7).(我的目标平台是android(等于或大于4)和ios(等于或大于7)。)
This is my first app but I am working on this for around one month but I am still not that much good that's why I stuck on the volume issue.
(这是我的第一个应用程序,但是我花了大约一个月的时间来研究它,但是我仍然没有那么好,这就是为什么我坚持音量问题。)
I am using following code:
(我正在使用以下代码:)
var my_audio = new Audio('test.mp3');
my_audio.play();
my_audio.volume=0.4;
console.log(my_audio.volume); // this still outputs 1
As you noticed above that volume did not change.
(正如您在上面注意到的那样,音量没有变化。)
I am using following links for reference: I am using this links for documentation: http://www.w3schools.com/tags/ref_av_dom.asp http://www.w3schools.com/tags/av_prop_volume.asp
(我正在使用以下链接作为参考:我正在使用此链接作为文档: http : //www.w3schools.com/tags/ref_av_dom.asp http://www.w3schools.com/tags/av_prop_volume.asp)
Can anybody guide that how to overcome this issue?
(有人可以指导如何克服这个问题吗?)
Any response will be appreciated.
(任何答复将不胜感激。)
Thanks(谢谢)
ask by Stack Developer translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…