I am loading a HTML page on to a webview, which has a list of videos. Now when I try to play the videos, they are playing but I am unable to make them play in full screen. I have used the below code in my HTML file, and on debugging found that 'element.webkitRequestFullScreen' says 'undefined'. On searching the web , I found videoEl.webkitEnterFullScreen();, but read that this is not working on Android 4. Is it actually possible to do this? or shall I drop the idea?
function launchFullScreen(element) {
alert("launchFullScreen"+element.webkitRequestFullScreen);
if (element.requestFullScreen) {
element.requestFullScreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
}