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” 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?
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?
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)
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.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.