Request: Force player iframe to refresh after div resizes

Hi,

I’ve embedded the dynamic twitch player via javascript as described in the docs. Now I would like to let the user resize it’s window / div size dynamically.

At my knowledge there is no way telling the iframe to resize? Could this be something you implement?

Something like

player = new Twitch.Player(“player_div”, 600, 400, some_cool_channel);
$(#player_div).height(800);
$(#player_div).width(1200);
player.resize();

Check out Demo for a demo of what I’m trying to build.

Cheers and thx!

You can set the Player to use 100% width and height then control the size from the parent.

player = new Twitch.Embed("player_div", {
    layout: "video",
    width: "100%",
    height: "100%",
    channel: some_cool_channel
});

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