# Request: Force player iframe to refresh after div resizes

**URL:** <https://staging-discuss.dev.twitch.com/t/request-force-player-iframe-to-refresh-after-div-resizes/13498>\
**Category:** API\
**Created:** [January 2, 2018, 8:45pm UTC](https://staging-discuss.dev.twitch.com/t/request-force-player-iframe-to-refresh-after-div-resizes/13498 "2018-01-02T20:45:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fastsyrup](https://avatars.discourse-cdn.com/v4/letter/f/c57346/32.png) [@fastsyrup](https://staging-discuss.dev.twitch.com/u/fastsyrup)\
**Post date:** [January 2, 2018, 8:45pm UTC](https://staging-discuss.dev.twitch.com/t/request-force-player-iframe-to-refresh-after-div-resizes/13498/1 "2018-01-02T20:45:28Z")

</div>

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](https://www.no-more-lonely-gaming.com/interactive-twitch-player/viewer?utf8=%E2%9C%93&channel1=JtgTv&channel2=TSM_Viss) for a demo of what I’m trying to build.

Cheers and thx!

---

<div class="post-metadata">

**Author:** ![modesttim](https://d1d6mrmdu7ztse.cloudfront.net/user_avatar/staging-discuss.dev.twitch.com/modesttim/32/10753_2.png) [@modesttim](https://staging-discuss.dev.twitch.com/u/modesttim)\
**Post date:** [January 2, 2018, 9:43pm UTC](https://staging-discuss.dev.twitch.com/t/request-force-player-iframe-to-refresh-after-div-resizes/13498/2 "2018-01-02T21:43:23Z")

</div>

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

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

```

> **[Embedding Twitch](https://dev.twitch.tv/docs/embed#embed-parameters)**
>
> Embedding Twitch on Your Website

---

<div class="post-metadata">

**Author:** ![system](https://d2spem0quai2ol.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://staging-discuss.dev.twitch.com/u/system)\
**Post date:** [February 1, 2018, 9:43pm UTC](https://staging-discuss.dev.twitch.com/t/request-force-player-iframe-to-refresh-after-div-resizes/13498/3 "2018-02-01T21:43:37Z")

</div>

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