开发者

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);
}-*/;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜