silverwind / droppy

**ARCHIVED** Self-hosted file storage
BSD 2-Clause "Simplified" License
1.62k stars 195 forks source link

Different behaviour when clicking to fullscreen vs using the button/alt+enter #379

Open kuzyn opened 5 years ago

kuzyn commented 5 years ago

There seems to be a different behaviour when playing a video and triggering full-screen mode:

I looked a bit into it and it seems that the event generated by these action are different: clicking the video pass-through to Plyr, while the toggle doesn't seem to do the same thing. Any pointer on where to look to PR this? I couldn't seem to wrap my head around what screenfull was and where is the actual invocation for top-right the button press is.

Thanks!

ps. Chromium Version 74.0.3729.169

silverwind commented 5 years ago

There are two fullscreen modes:

  1. The Alt-Enter and button triggers screenfull.js which basically just puts the .view in fullscreen (but still allows switching to next media etc.).
  2. The plyr fullscreen which puts the <video> itself into fullscreen and which does cursor hiding but not allow to switch to other media.

I think cursor hiding is generally desireable in fullscreen (also on other content like images or pdf). Ideally we could detect if plyr wants to go fullscreen, prevent it, and trigger fullscreen via screenfull instead. Would need to replicate mouse hiding ourselves, thought.

On a sidenote, I fixed a bug with screenfull-induced fullscreen cutting off a section from the buttom of the video.

kuzyn commented 5 years ago

Yeah I agree that having a constant fullscreen behaviour makes logical sense. Hopefully I can queue this up before the summer end ;) :+1: