Use document.fullscreenElement instead of window.fullScreen
Move all fullscreen related code to their own functions
Add and remove a few z-indexes to fix Safari rendering the player wrong
Use relative timestamps if the played media is live
Update the state of the fullscreen button in the fullscreenchange event. Except on iOS devices. iPhones don't have that event (source). They update the button every 0.5 seconds.
Fixes #2, #3, #4, #5
Changes:
document.fullscreenElement
instead ofwindow.fullScreen
fullscreenchange
event. Except on iOS devices. iPhones don't have that event (source). They update the button every 0.5 seconds.