diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-22 00:32:08 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-22 00:32:08 +0100 |
commit | 52bc7111147dd3e87e4bf0ae57241c2b81892f78 (patch) | |
tree | 412791c6236577f0a18494f3ac21c67419c1b5b1 | |
parent | cdfda3436aa96134797f6f1c45d76227770f1f4b (diff) |
Keep video player fullscreened when changing to the next video
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | include/VideoPlayer.hpp | 1 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 1 | ||||
-rw-r--r-- | src/VideoPlayer.cpp | 3 |
4 files changed, 7 insertions, 1 deletions
@@ -246,4 +246,5 @@ Detect invidious urls too, even the ones that dont have watch?v=.. this could be Atomic file operations should use a random generated name instead of .tmp, because multiple instances of quickmedia may be running and they may try to write to the same file at the same time. In such cases they can also write to the same temporary file at the same time. TODO: https://github.com/matrix-org/synapse/issues/14444. Use matrix /sync "since" param. Its beneficial even to quickmedia because synapse is written in such a way that using "since" is faster. -/encrypt should support formatted text like greentext, custom emoji, mentions etc.
\ No newline at end of file +/encrypt should support formatted text like greentext, custom emoji, mentions etc. +allow opening 4chan thread directly (with jumping to comment), allow navigating to cross-post/dead thread with ctrl+i, fallback to 4chan archive if thread is dead.
\ No newline at end of file diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index 016c830..5dc491a 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -51,6 +51,7 @@ namespace QuickMedia { std::string plugin_name; bool cache_on_disk = true; std::string referer; + bool fullscreen = false; }; // Important: do not call |get_time_in_file| or |add_subtitle| from the |event_callback| callback diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 074f3e9..6f089be 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3439,6 +3439,7 @@ namespace QuickMedia { startup_args.plugin_name = plugin_name; startup_args.cache_on_disk = !video_page->is_local(); startup_args.referer = video_info.referer; + startup_args.fullscreen = window_is_fullscreen(disp, window.get_system_handle()); video_player = std::make_unique<VideoPlayer>(std::move(startup_args), video_event_callback, on_window_create); VideoPlayer::Error err = video_player->load_video(); diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp index 28da43d..4a50f79 100644 --- a/src/VideoPlayer.cpp +++ b/src/VideoPlayer.cpp @@ -215,6 +215,9 @@ namespace QuickMedia { fprintf(stderr, "Wayland detected. Launching mpv in x11egl mode\n"); } + if(startup_args.fullscreen) + args.push_back("--fs=yes"); + if(startup_args.keep_open) args.push_back("--keep-open=yes"); |