betterttv icon indicating copy to clipboard operation
betterttv copied to clipboard

[Feature] Add theatre mode in fullscreen button

Open karlito40 opened this issue 3 years ago • 2 comments

Hello,

I've add a button in the video player to enable the "theatre mode" in fullscreen. I think it could be useful for people. At least it is for me.

Here is a little preview:

theater-in-fullscreen-compress

I couldn't make a more relevant icon though as i don't have access to illustrator.

karlito40 avatar Oct 04 '20 13:10 karlito40

circling back to this now. is it possible to use twitch's theater mode icon, and then only enable this icon when already in fullscreen?

the functionality could be:

  1. enter fullscreen
  2. enable theater mode, which re-requests full screen with chat
  3. clicking theater mode icon again re-requests full screen without chat

what do you think?

night avatar Nov 29 '20 03:11 night

It was my first approach. I think it's the cleanest solution but there is an issue with that:

  • a video already in full screen goes black when you request a full screen on an other element

I have no idea how to fix that at this time. I tried to exit and request another full screen operation but it's forbidden as this need to be trigger by a user interaction.

If you want to see that in action: go to twitch, open a stream in full screen and type document.body.requestFullscreen() in your devtool. You'll see that we lost the video :(

Otherwise it will be a much better user experience than my current solution if we fix this issue.

I think it could be also cool if we manage to preserve the theater mode on a fullscreen request. A code like that could do the trick:

document.querySelector('[data-a-target="player-fullscreen-button"]').addEventListener ('click', e => {
  const isTheatreActive = Boolean(document.querySelector('[data-a-player-state="theatre"]'));
  if (!document.fullscreenElement && isTheatreActive) {
    document.body.requestFullscreen();
  }
});

it may conflict with all the other event listener of this button though... even if it does not looks to cause any damage at this time

karlito40 avatar Nov 29 '20 12:11 karlito40

thanks for the request. since this has gone stagnant I'm going to close this for now. we'd still be open to a pull request for this feature, but I don't like the idea of a different button for it in the video player (it just generates confusion for users)

night avatar Dec 26 '22 20:12 night

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new pull request for related issues or feature requests.

github-actions[bot] avatar Mar 26 '23 21:03 github-actions[bot]