aboutsummaryrefslogtreecommitdiff
path: root/src/VideoPlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r--src/VideoPlayer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 0510a4c..c6f5a36 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -18,12 +18,13 @@ const int MAX_RETRIES_CONNECT = 20;
const int READ_TIMEOUT_MS = 200;
namespace QuickMedia {
- VideoPlayer::VideoPlayer(bool use_tor, bool no_video, bool use_system_mpv_config, bool resume_playback, EventCallbackFunc _event_callback, VideoPlayerWindowCreateCallback _window_create_callback, const std::string &resource_root) :
+ VideoPlayer::VideoPlayer(bool use_tor, bool no_video, bool use_system_mpv_config, bool resume_playback, bool keep_open, EventCallbackFunc _event_callback, VideoPlayerWindowCreateCallback _window_create_callback, const std::string &resource_root) :
exit_status(0),
use_tor(use_tor),
no_video(no_video),
use_system_mpv_config(use_system_mpv_config),
resume_playback(resume_playback),
+ keep_open(keep_open),
video_process_id(-1),
ipc_socket(-1),
connected_to_ipc(false),
@@ -104,6 +105,9 @@ namespace QuickMedia {
wid_arg.c_str()
});
+ if(keep_open)
+ args.push_back("--keep-open=yes");
+
if(!resume_playback)
args.push_back("--no-resume-playback");