Hey devs 
There is a code to embed a stream channel :
<script type="text/javascript">
new Twitch.Embed("twitch-embed", {
width: 854,
height: 360,
channel: "channel_name"
});
</script>
Is there any way I can pimp my code, so the channel name will actually appear, after user logins with twitch authenticator?
Thanks, a lot 
Embedding Twitch | Twitch Developers Look at: Working with Events. It tells you you can add an event listener.
var embed = new Twitch.Embed('twitch-embed', {
channel: 'monstercat'
});
embed.addEventListener(Twitch.Embed.AUTHENTICATE, function(user) {
console.log(user.login + ' just logged in');
});
You an do other things with that user object on authenticate other than logging it to the console you can modify an HTML to display what you need.
document.getElementById(βSOME_ID_OF_A_DIVβ).innerHTML = user;
system
Closed
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.