-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Ads): Fix VMAP won't play in muted autoplay #6046
Conversation
lib/ads/client_side_ad.js
Outdated
/** | ||
* @param {number} videoVolume | ||
*/ | ||
mute(videoVolume) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, after some examining I agree that this method needs to exist, so that we can keep track of what the previous video volume is without actually setting the volume on the ad element.
However, this name is bad. It's very similar to the setMuted
method, and doesn't really explain how the two methods are different.
Instead I'd call this something like "setInitialMuted", and add a comment to the JSDoc that it's required for a muted ad to start when autoplaying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Fixes #6020
Fixes #6037