开发者

HTML5: Video on the iPad - Custom Zoom Control

I've created a smaller UIWebView on the iPad, and so I've written my own HTML5 controllers for the video. Currently when I maximize the video it's showing a pure black screen (Rather than the actual video). The sound is still working and i can still pause and hit play, however just have a black video. (also when i go back to my minimized mode video isn't there any more).

This of course works fine in the web browser, just not 开发者_开发技巧on the iPad.

Here is the maximize code:

function fullScreenOn(){
    videoIsFullScreen = true;
    videoOrigWidth = video.offsetWidth;
    videoOrigHeight = video.offsetHeight;
    video.style.width = window.innerWidth + "px";
    video.style.height = window.innerHeight + "px";
    video.style.position = "fixed";
    video.style.left = 0;
    video.style.top = 0;
    controls.style.position = "fixed";
    positionController();

    fullScreenControl.className = "fs-active control";
  }

  function fullScreenOff(){
    videoIsFullScreen = false;
    video.style.width = videoOrigWidth + "px";
    video.style.height = videoOrigHeight + "px";
    video.style.position = "static";
    controls.style.position = "absolute";
    positionController();
    fullScreenControl.className = "control";
  }

the video variable is my container.

If it entertains you.. the screenshot:

HTML5: Video on the iPad - Custom Zoom Control

Cheers


I'm working on something similar, and I've found that setting position = 'absolute' on the video element causes it to stop displaying video.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜