Flash has an API to control the volume for a Sound object. Can volume be controlled like this currently or is there support planned for <audio> or <video> html5 elements?
Flash has an API to control the volume for a Sound object . Can
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The html 5 audio element appears to have a volume getter/setter on it, so you could do something like this in jQuery:
Source: http://www.whatwg.org/specs/web-apps/current-work/#user-interface
This seems to work in Safari 4, though I couldn’t get it to play with FF 3.5.
(Note there’s no bounds checking in the code above… you’ll get a javascript error if you try to set the value below 0 or above 1.)
-John