Skip to content Skip to sidebar Skip to footer

Problems Creating A Custom Volume Control For Html5 Video

I have a fairly complex project in the works that requires a custom volume slider to control an HTML5 video element. I've boiled the volume control down to a very simple example a

Solution 1:

Instead of $('#video').attr("volume", newvolume);, try this:

$('#video')[0].volume = newvolume;

If memory serves, volume is not an attribute of video in HTML5, it is only accesible via the DOM element itself.

Post a Comment for "Problems Creating A Custom Volume Control For Html5 Video"