Setting volume on line

Is there a way to set the volume to 0.1 or lower upon live/online? Can I set it to 0.01 just so it’s not completely muted?

window.player<?php echo $id; ?>.addEventListener(Twitch.Player.PLAYING, function() {
window.player<?php echo $id; ?>.setQuality(“360p”);
window.player<?php echo $id; ?>.setVolume(0.1);

This code is not working. But I think it should.

Depends what you mean by “not working”

You’ll generally find that the player is “muted” and will be muted until the user interacts with the page (due to the magical black box of browsers + auto play non muted video content, and the related “site interaction score”).

So I’d guess the problem is the video is muted and you did set the volume.

Mute and volume setting are two different things in the player JS API. And a call to unmute may also be blocked by the browser until the users interact. So when the user manually unmutes the player then the select volume should apply

So I guess that means there’s no work around it, right?
I just want it to work like youtube, where it’s not muted on play.

I tried adding isMuted() but to no avail, it still didn’t work when the user goes online.

Thats the mystery browser interaction score inferring with auto play then!.

Here is a related resource

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.