Skip to content

Commit

Permalink
Merge pull request #665 from Arnavion/exitfullscreen
Browse files Browse the repository at this point in the history
Fixed calls to document.exitFullscreen()
  • Loading branch information
ddevault committed Jan 5, 2015
2 parents 7d13c5d + d489bd4 commit c44ca71
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions scripts/players.coffee
@@ -1,9 +1,11 @@
subtitleRenderers = {}

document.cancelFullScreen = document.cancelFullScreen ||
document.exitFullscreen = document.exitFullscreen ||
document.cancelFullScreen ||
document.mozCancelFullScreen ||
document.webkitExitFullscreen ||
document.webkitCancelFullScreen ||
document.msExitFullscreen # Thanks for that last one, Microsoft, well done
document.msExitFullscreen

MediaPlayer = (container) ->
media = container.querySelector('video, audio')
Expand Down Expand Up @@ -229,7 +231,7 @@ MediaPlayer = (container) ->
isFullscreen = false
container.classList.remove('fullscreen')
fullscreen.classList.remove('disabled')
document.cancelFullScreen()
document.exitFullscreen()
# Chrome hack to fix positioning when leaving full screen
_ = document.querySelector('.media')
_.style.right = 0 if _
Expand Down
2 changes: 1 addition & 1 deletion static/album.js

Large diffs are not rendered by default.

0 comments on commit c44ca71

Please sign in to comment.