Resizing the window playing HTML5 video
I have videos playing on a new window using the video tag in HTML5. I want the size of this new window to change depending on the height and width of the video that is being played. Is there some 开发者_运维技巧way to do this? I am using GWT by the way.
The JavaScript you want to end up calling is window.resizeTo(h, w)
You can do this in GWT using JSNI, like so:
native void resizeWindow(int height, int width) /*-{
$wnd.resizeTo(height, width);
}-*/;
精彩评论