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:
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.
精彩评论