• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Pre-setting the volume level of a webpage <video>

Engaged ,
Mar 06, 2023 Mar 06, 2023

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!

Views

317

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 06, 2023 Mar 06, 2023

If audio track is obnoxiously loud, you need to fix that in the native video file before it's transcoded to MP4.

 

Votes

Translate

Translate
Community Expert ,
Mar 06, 2023 Mar 06, 2023

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.... >

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 06, 2023 Mar 06, 2023

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.

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 08, 2023 Mar 08, 2023

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 06, 2023 Mar 06, 2023

Copy link to clipboard

Copied

quote

...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. 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines