HTML5 videos always start at 100% volume.
How can I make them start at 50% volume?
If all you want is really to avoid the width/height to return to defaults (300 x 150) when the next video is loading, you just have to set your <video> 's width and height properties to the ones of the loaded video ( videoWidth and videoHeight are the real values of the media, not the ones of the element).
You can affect the volume
property of the <video>
element as follows:
document.getElementsByTagName('video')[0].volume = 0.5;
If using jQuery then you can use their prop
method to alter the volume in a jQuery collection object like so:
$("video").prop("volume", 0.5);
This will alter all DOM elements in the collection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With