0
votes

I have an android application that loads a html page using webview. I am using youtube iframe api to play a video. It plays and everything works except the video is not fitting the container. Now the actual youtube controls and frame fits correctly. The video however is small. Its kinda like its doing its own aspect ratio within the youtube container. I have set width and height to 100% and still does this. Is there something that causes this to do this.

1
Ok a little update it seems to be an issue with the iframe. I took this iframe <iframe class="youtube-player" style="border: 0; width: 100%; height: 100%; padding:0px; margin:0px" id="ytplayer" type="text/html" src="youtube.com/embed/INmtQXUXez8?fs=0&autoplay=1" frameborder="0" > </iframe> and put it in an html file. Then i pointed the webview to the html file and the video plays but for some reason it shrinks inside the youtube container. It doesnt fill the container at all. The controls and frame is correct but the video is small.user2715966

1 Answers

0
votes

I think the explaination and answer to your problem might be on this doc :

"Supporting Different Screens in Web Apps" : http://developer.android.com/guide/webapps/targeting.html