cinera_player_post.js: Fix fullscreen handling
It is possible to bring our player out of fullscreen mode without using the provided views menu or keyboard shortcut, e.g. by pressing Escape. Doing so leaves our state in the SUPERTHEATRE view, which omits SUPERtheatre mode itself from the views menu. This commit fixes this by switching our state to the THEATRE view. Thanks to Aske Bisgaard Vammen for the report.
This commit is contained in:
parent
6852d06e04
commit
77aec74483
|
@ -23,7 +23,7 @@ typedef struct
|
|||
version CINERA_APP_VERSION = {
|
||||
.Major = 0,
|
||||
.Minor = 10,
|
||||
.Patch = 27
|
||||
.Patch = 28
|
||||
};
|
||||
|
||||
#define __USE_XOPEN2K8 // NOTE(matt): O_NOFOLLOW
|
||||
|
|
|
@ -65,3 +65,12 @@ document.addEventListener("keydown", function(ev) {
|
|||
ev.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("fullscreenchange", function() {
|
||||
if(!document.fullscreenElement && CineraProps.V == views.SUPERTHEATRE)
|
||||
{
|
||||
CineraProps.V = views.THEATRE;
|
||||
localStorage.setItem(player.cineraViewStorageItem, views.THEATRE);
|
||||
player.updateSize();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue