Skip to content

Commit

Permalink
Rework fullscreen request method detection
Browse files Browse the repository at this point in the history
  • Loading branch information
lighterowl authored and Flole998 committed Jul 13, 2024
1 parent 457c02d commit 1dc8ffe
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/webui/static/tv.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,16 +264,18 @@ tv.ui.VideoPlayer = Ext.extend(Ext.Panel, (function() {
},

fullscreen: function() {
var dom = this.video.dom;
var dom = this.video.dom;

if(typeof dom.requestFullScreen !== 'undefined')
dom.requestFullScreen();
var requestMethod = dom.requestFullScreen ||
dom.mozRequestFullScreen ||
dom.webkitEnterFullscreen ||
dom.webkitRequestFullscreen ||
dom.webkitRequestFullScreen ||
dom.msRequestFullscreen;

else if(typeof dom.mozRequestFullScreen !== 'undefined')
dom.mozRequestFullScreen();

else if(typeof dom.webkitRequestFullScreen !== 'undefined')
dom.webkitEnterFullscreen();
if(requestMethod) {
requestMethod.apply( dom );
}
},

play: function() {
Expand Down

0 comments on commit 1dc8ffe

Please sign in to comment.