Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen on doubleclick #198

Closed
platinum55 opened this issue Mar 17, 2019 · 2 comments · Fixed by #275
Closed

Fullscreen on doubleclick #198

platinum55 opened this issue Mar 17, 2019 · 2 comments · Fixed by #275
Labels
enhancement Improve existing functionality or small fixes

Comments

@platinum55
Copy link

just trigger fullscreen on doubleclick, maybe with an option to disable it, for users who have problems with it.

As a workaround I added this piece of code to videoosd.js around line #1255:

    dom.addEventListener(view, "dblclick", function (e) {
        playbackManager.toggleFullscreen(currentPlayer);
    }, {
        passive: true
    });

This works so far, but sometimes the poster and osd does not hide.. would be cool to have it nicely implemented :)

@JustAMan JustAMan transferred this issue from jellyfin/jellyfin Mar 18, 2019
@JustAMan JustAMan added the enhancement Improve existing functionality or small fixes label Mar 18, 2019
@DrPandemic
Copy link
Contributor

I've been playing around with your snippet and it seems to be working. I'm unable to reproduce your bug where the osd doesn't hide. Which browser are you using? Are you getting this issue on some specific media?

The only thing I would do differently is that I wouldn't bind the event on mobile

        if (browser.touch) {
            dom.addEventListener(view, "dblclick", onDoubleClick, {});
        } else {
            dom.addEventListener(view, "dblclick", function () {
                playbackManager.toggleFullscreen(currentPlayer);
            }, {
                passive: true
            });
        }

I found only one outside thing that can prevent the osd from hiding and it's the viewbeforehide event. But this seems to only be trigger when switching page. A workaround could be to call startOsdHideTimer() in the event listener to be sure the timer was not cleared before or during the fullscreen action.

@platinum55
Copy link
Author

platinum55 commented Apr 25, 2019

hello mate, I haven't had the issue again, maybe it disappeared while upgrading from 10.2.2 to 10.3.0 :-) thanks for your enhancement! have a nice day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or small fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants