Closed jzisser9 closed 8 years ago
this.options = {
width: 480,
height: 320,
channel: 'xerokynos',
//video: '{VIDEO_ID}'
}
var player = new Twitch.Player('twitch_player', options); // Initialized
// Change width and height of initialized. Search for iframe within twitchplayer div and change w & h
$('#twitch_player).find('iframe').css('width', 1280); // changes the width of the iframe
$('#twitch_player).find('iframe').css('height', 800); // changes the height of the iframe
Uses jQuery though.
You know, I was messing around in a JavaScript console and was doing something along these lines with no success, but I didn't try jQuery. I'll give that a shot. Thanks!
There doesn't appear to be a way to change an interactive player's size once it's initialized, other than re-initializing it, which isn't ideal. The closest I can get is to change the CSS 'zoom' property of the div or the entire body, depending on if I need everything in my page to remain proportionate to the player.