options: remove the player argument from --media-controls

It is now handled internally by the libmpv profile.

Since `player` was the default option, the impact should be minimal, as it
is uncommon to override the default option with the same value.
yes/no args will function the same way as before this commit.
This commit is contained in:
Kacper Michajłow
2025-01-03 12:32:41 +01:00
parent 50d7d33777
commit 96da0cbcbd
6 changed files with 8 additions and 9 deletions
@@ -0,0 +1 @@
remove `player` argument form `--media-controls`, it's handled internally now.
+2 -4
View File
@@ -7646,12 +7646,10 @@ Miscellaneous
.. warning:: Using realtime priority can cause system lockup.
``--media-controls=<yes|player|no>``
``--media-controls=<yes|no>``
(Windows only)
Enable integration of media control interface SystemMediaTransportControls.
If set to ``player``, only the player will use the controls. Setting it to
``yes`` will also enable the controls for libmpv integrations.
(default: ``player``)
Default: yes (except for libmpv)
``--force-media-title=<string>``
Force the contents of the ``media-title`` property to this value. Useful
+1
View File
@@ -28,6 +28,7 @@ input-default-bindings=no
input-vo-keyboard=no
# macOS global input hooks
input-media-keys=no
media-controls=no
[encoding]
vo=lavc
+2 -3
View File
@@ -517,8 +517,7 @@ static const m_option_t mp_opts[] = {
{"idle", IDLE_PRIORITY_CLASS}),
.flags = UPDATE_PRIORITY},
#endif
{"media-controls", OPT_CHOICE(media_controls,
{"no", 0}, {"player", 1}, {"yes", 2})},
{"media-controls", OPT_BOOL(media_controls)},
{"config", OPT_BOOL(load_config), .flags = M_OPT_PRE_PARSE},
{"config-dir", OPT_STRING(force_configdir),
.flags = M_OPT_NOCFG | M_OPT_PRE_PARSE | M_OPT_FILE},
@@ -1026,7 +1025,7 @@ static const struct MPOpts mp_default_opts = {
.osd_bar_visible = true,
.screenshot_template = "mpv-shot%n",
.play_dir = 1,
.media_controls = 1,
.media_controls = true,
.video_exts = (char *[]){
"3g2", "3gp", "avi", "flv", "m2ts", "m4v", "mj2", "mkv", "mov", "mp4",
"mpeg", "mpg", "ogv", "rmvb", "ts", "webm", "wmv", "y4m", NULL
+1 -1
View File
@@ -337,7 +337,7 @@ typedef struct MPOpts {
bool osd_bar_visible;
int w32_priority;
int media_controls;
bool media_controls;
struct bluray_opts *stream_bluray_opts;
struct cdda_opts *stream_cdda_opts;
+1 -1
View File
@@ -406,7 +406,7 @@ int mp_initialize(struct MPContext *mpctx, char **options)
#endif
#if HAVE_WIN32_SMTC
if (opts->media_controls == 2 || (mpctx->is_cli && opts->media_controls == 1))
if (opts->media_controls)
mp_smtc_init(mp_new_client(mpctx->clients, "SystemMediaTransportControls"));
#endif