Copy link to clipboard
Copied
Is there a non-js way to pre-set the volume slider in a <video>? Nothing against js, my site just randomly happens to be js-free so I'm trying to keep the streak alive, not a big deal if that streak ends here. (Unless it can be done through PHP, which the site does use?)
Basically, I'm just looking to make sure no one's volume slider is at 100% when the video starts, by pre-setting it to 70%. Not a big deal, more of a nice-to-have than a need.
Thanks!
If audio track is obnoxiously loud, you need to fix that in the native video file before it's transcoded to MP4.
Copy link to clipboard
Copied
No. Volume is a user setting. However, you can MUTE audio if you need to.
<video controls="controls" muted="muted" etc.... >
Copy link to clipboard
Copied
If audio track is obnoxiously loud, you need to fix that in the native video file before it's transcoded to MP4.
Copy link to clipboard
Copied
Thanks. That's pretty much what I ended up doing when I found out there's no easy HTML toggle like there is for mute.
Copy link to clipboard
Copied
...my site happens to be js-free so I'm trying to keep the streak alive... (Unless it can be done through PHP, which the site does use?)
By @Under S.
=========
Why avoid it? PHP and JavaScript are not mutually exclusive. But they are two different languages with a different purpose in web development. PHP is a server-side language that executes scripts on the server. JavaScript is a client-side language that executes in the user's browser. Most dynamic websites use both -- PHP for heavy lifting and JavaScript for interactivity and to create a better user experience.