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

38

Likes

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.

 

Likes

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

Likes

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