I’m having trouble making a video player element fullscreen using the fullscreen API, specifically webkitRequestFullScreen
. I’m specifically having trouble with my Ionic app on a Samsung Galaxy S4 running 4.4.2. Here’s what I’m trying to doing.
$scope.goFullscreen = function() {
var elem = document.getElementById("video_element");
var requestMethod = elem.requestFullScreen || elem.webkitRequestFullScreen;
if (requestMethod) { // Native full screen.
requestMethod.call(elem);
console.log("requested fullscreen");
}
};
The function is firing but nothing happens, no errors, nothing. I tried the same function in a simple Cordova app and it works. I’ve tried a couple of other players in my app such as Video.js and it’s fullscreen button doesn’t work either. Anyone else having this problem?