Pressing f while watching a video doesn't toggle fullscreen.
f.f again, nothing happened.Fullscreen should be toggled.
Nothing happens instead.
Implement toggling fullscreen when pressing f.
f.f.Thanks for opening this issue! I agree, this would be a nice shortcut to have! Do you want to take a shot at implementing it?
Can we send you some appreciation for opening the issue?
I could take a shot, though it might take me a while given how busy I am.
Question: would it be OK if it is hardwired?
Appreciation is always welcome :-)
@ngeiswei hmm, not sure what you mean by hardwired. Maybe this previous PR to add a different shortcut would help: https://github.com/lbryio/lbry-desktop/pull/2003
By hardwired I mean that the shortcut, here f, is specified in the code rather than in a config file that is accessible to the user.
BTW, I had a look at the code and I think I can handle it (especially if hardwired), just need to gather free time for it.
Hey @ngeiswei
This is a great idea! This shouldn't be accessible to the user, but should just happen in the background like youtube does.
f should maximize the screen, but also minimize it.
Since we already have this functionality for double-click, it should be pretty straight forward to add.
You could add the event listener right below this line: https://github.com/lbryio/lbry-desktop/blob/master/src/renderer/component/fileViewer/internal/player.jsx#L110
We just need to make sure we remove it when the component is unmounted. And make sure we don't do anything if the input bar has focus (so we don't fullscreen when someone types an f into the search bar). You can check the focused value in the search reducer.
Hi @seanyesmunt, yeah, player.jsx L110 is exactly where I had my eyes on.
We just need to make sure we remove it when the component is unmounted
I don't fully understand that but I guess it will become clear as I dwell deeper into the code.
Thanks for the other tips.
@ngeiswei No problem.
I just meant that we need to remove the event listener when the react component leaves the page. We don't care if a user pressed f on the settings page. We do something similar here:
https://github.com/lbryio/lbry-desktop/blob/master/src/renderer/component/wunderbar/view.jsx#L39-L41
Most helpful comment
I could take a shot, though it might take me a while given how busy I am.
Question: would it be OK if it is hardwired?
Appreciation is always welcome :-)