# Adjusting width/height Embed code

**URL:** <https://discuss.dev.twitch.com/t/adjusting-width-height-embed-code/1434>\
**Category:** Help / Off-topic\
**Created:** [January 10, 2015, 12:18am UTC](https://discuss.dev.twitch.com/t/adjusting-width-height-embed-code/1434 "2015-01-10T00:18:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gamerzfanz21](https://avatars.discourse-cdn.com/v4/letter/g/65b543/32.png) [@gamerzfanz21](https://discuss.dev.twitch.com/u/gamerzfanz21)\
**Post date:** [January 10, 2015, 12:18am UTC](https://discuss.dev.twitch.com/t/adjusting-width-height-embed-code/1434/1 "2015-01-10T00:18:23Z")

</div>

What I am trying to do is make the video bigger (like how it is on twitch). Now the embed code/iframe shows as follows:  
iframe src=“[http://www.twitch.tv/twitchname/embed](http://www.twitch.tv/twitchname/embed)” frameborder=“0” scrolling=“no” height=“500” width=“620”

Now when I change the height/width, its just making the iframe bigger but  
not the video itself… How can I make the video bigger?

---

<div class="post-metadata">

**Author:** ![Fugiman](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/fugiman/32/108_2.png) [@Fugiman](https://discuss.dev.twitch.com/u/Fugiman)\
**Post date:** [January 10, 2015, 11:12am UTC](https://discuss.dev.twitch.com/t/adjusting-width-height-embed-code/1434/2 "2015-01-10T11:12:25Z")

</div>

The flash player should expand to fit the size of the iframe, but the actual video content maintains a 16:9 aspect ratio, so if you only increase one dimension, the video content won’t appear any bigger.

If you’ve increased both height and width and the video content still doesn’t fill the screen, can you provide a link with an example so I can take a look?

---

<div class="post-metadata">

**Author:** ![gamerzfanz21](https://avatars.discourse-cdn.com/v4/letter/g/65b543/32.png) [@gamerzfanz21](https://discuss.dev.twitch.com/u/gamerzfanz21)\
**Post date:** [January 10, 2015, 5:17pm UTC](https://discuss.dev.twitch.com/t/adjusting-width-height-embed-code/1434/3 "2015-01-10T17:17:08Z")

</div>

[http://gamerzfan.com/test/twitch/twitch.html](http://gamerzfan.com/test/twitch/twitch.html)  
See how the outer part is a larger size, but the video content itself is still smaller. Shouldn’t the video content be the same size of the video? the video content on twitch itself is the same size as the player, so using an embed code, should work the same? (Ive also tried using the API and it does the same thing)

---

<div class="post-metadata">

**Author:** ![Slowkill](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Slowkill](https://discuss.dev.twitch.com/u/Slowkill)\
**Post date:** [January 10, 2015, 7:08pm UTC](https://discuss.dev.twitch.com/t/adjusting-width-height-embed-code/1434/4 "2015-01-10T19:08:20Z")

</div>

As Fugiman said, the actual video will always maintain an aspect ratio of 16:9. If you want to outer box to have the same dimensions as the video, you will need to use JS and calculate the needed height of the outer box based on the width of the video.

For example (using jQuery syntax):  
var videoWidth = $(’[video element selector]’).width();

$(’[outer box selector]’).heigth(videoWidth \* (9/16));

This may not be completely correct, but it should help you get started.

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [January 20, 2015, 7:08pm UTC](https://discuss.dev.twitch.com/t/adjusting-width-height-embed-code/1434/5 "2015-01-20T19:08:54Z")

</div>

Closed on January 20, 2015, 7:08pm UTC

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