开发者

Resizing the window playing HTML5 video

开发者 https://www.devze.com 2022-12-22 07:17 出处:网络
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 开发

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

精彩评论

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