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

Can I use JS to change the volume of a video in the html5 video component?

Community Beginner ,
Nov 06, 2020 Nov 06, 2020

Copy link to clipboard

Copied

I just want to be able to load the video component at 50% volume so I don't blow the users ears out when a video plays?

 

seems like I should be able to do that easily.  I can't find documentation ANYWHERE.

Views

104

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 Beginner ,
Nov 06, 2020 Nov 06, 2020

Copy link to clipboard

Copied

I think I am seeing the issue - I am issuing the command: this.diy1embed.volume=.25;   it works in the console but is unavailable in the movie on click or on frame - I believe its a timing issue.

 

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 Beginner ,
Nov 06, 2020 Nov 06, 2020

Copy link to clipboard

Copied

LATEST

ok all - here was the solution:

setTimeout(function(){ this.diy1embed.volume=.15; }, 200);

a 200ms delay on the volume change gave the component the time to load

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