So i’ve been looking into creating something for Apex Legends and would like to embed a couple of streamers on the main page so people can discover them easier.
What i’ve been trying to do is:
<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="ChannelDiv"></div>
<script type="text/javascript">
var options = {
width: 500,
height: 500,
channel: "shroud",
};
var player = new Twitch.Player("ChannelDiv", options);
player.setVolume(0.0);
</script>
But the “player.setVolume(0.0);” doesn’t really do anything, i’ve tried “player.setMuted(true)” as well.
Is there a way to fix it or at least mute the player in some way?
If you find a workaround it’s a bug in chromium which will get fixed.
And then you’d need to find a new work around…
Basically you can’t set the volume until the user interacts. it is weird that it doesn’t raise any console errors reporting this issue. So the Twitch embed library might be handling this internally with no feedback.
But it won’t help you to auto play and unmute the audio.