I've customized a smaller UIWebView specifically for the iPad, and I've created my own HTML5 controls for the video playback. However, when I try to maximize the video, all I see is a black screen instead of the actual content. The audio still plays, and I can pause and play the video, but visually it's just black. Additionally, when I go back to the minimized mode, the video disappears completely.
Interestingly, this issue does not occur when accessing the video on a web browser; it seems to be unique to the iPad.
Below is the code snippet used for maximizing the video:
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 refers to my video container element.
If you're curious, here's a snapshot of the issue:
Cheers!