0
Can I use JS to change the volume of a video in the html5 video component?
Community Beginner
,
/t5/animate-discussions/can-i-use-js-to-change-the-volume-of-a-video-in-the-html5-video-component/td-p/11574056
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Dylanwoo24
AUTHOR
Community Beginner
,
/t5/animate-discussions/can-i-use-js-to-change-the-volume-of-a-video-in-the-html5-video-component/m-p/11574092#M337201
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.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Dylanwoo24
AUTHOR
Community Beginner
,
LATEST
/t5/animate-discussions/can-i-use-js-to-change-the-volume-of-a-video-in-the-html5-video-component/m-p/11574118#M337202
Nov 06, 2020
Nov 06, 2020
Copy link to clipboard
Copied
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
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

