mirror of
https://github.com/mpv-player/mpv
synced 2025-04-28 06:09:32 +00:00
command: default to osd-msg-bar for seeks
The previous default was osd-bar (unless the user specified --no-osd-bar, in which case case it was osd-msg). Aside from requiring some twisted logic to implement, this surprised users since osd-msg3 wasn't displayed when seeking with the keyboard (#3028), so the time seeked to was never displayed.
This commit is contained in:
parent
c5d79791fe
commit
aef2ed5dc1
@ -3097,8 +3097,7 @@ OSD
|
|||||||
Whether to load the on-screen-controller (default: yes).
|
Whether to load the on-screen-controller (default: yes).
|
||||||
|
|
||||||
``--no-osd-bar``, ``--osd-bar``
|
``--no-osd-bar``, ``--osd-bar``
|
||||||
Disable display of the OSD bar. This will make some things (like seeking)
|
Disable display of the OSD bar.
|
||||||
use OSD text messages instead of the bar.
|
|
||||||
|
|
||||||
You can configure this on a per-command basis in input.conf using ``osd-``
|
You can configure this on a per-command basis in input.conf using ``osd-``
|
||||||
prefixes, see ``Input command prefixes``. If you want to disable the OSD
|
prefixes, see ``Input command prefixes``. If you want to disable the OSD
|
||||||
@ -3136,16 +3135,15 @@ OSD
|
|||||||
shown.
|
shown.
|
||||||
|
|
||||||
This is also used for the ``show-progress`` command (by default mapped to
|
This is also used for the ``show-progress`` command (by default mapped to
|
||||||
``P``), or in some non-default cases when seeking.
|
``P``), and when seeking.
|
||||||
|
|
||||||
``--osd-status-msg`` is a legacy equivalent (but with a minor difference).
|
``--osd-status-msg`` is a legacy equivalent (but with a minor difference).
|
||||||
|
|
||||||
``--osd-status-msg=<string>``
|
``--osd-status-msg=<string>``
|
||||||
Show a custom string during playback instead of the standard status text.
|
Show a custom string during playback instead of the standard status text.
|
||||||
This overrides the status text used for ``--osd-level=3``, when using the
|
This overrides the status text used for ``--osd-level=3``, when using the
|
||||||
``show-progress`` command (by default mapped to ``P``), or in some
|
``show-progress`` command (by default mapped to ``P``), and when
|
||||||
non-default cases when seeking. Expands properties. See
|
seeking. Expands properties. See `Property Expansion`_.
|
||||||
`Property Expansion`_.
|
|
||||||
|
|
||||||
This option has been replaced with ``--osd-msg3``. The only difference is
|
This option has been replaced with ``--osd-msg3``. The only difference is
|
||||||
that this option implicitly includes ``${osd-sym-cc}``. This option is
|
that this option implicitly includes ``${osd-sym-cc}``. This option is
|
||||||
|
@ -4821,7 +4821,6 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
|
|||||||
bool auto_osd = on_osd == MP_ON_OSD_AUTO;
|
bool auto_osd = on_osd == MP_ON_OSD_AUTO;
|
||||||
bool msg_osd = auto_osd || (on_osd & MP_ON_OSD_MSG);
|
bool msg_osd = auto_osd || (on_osd & MP_ON_OSD_MSG);
|
||||||
bool bar_osd = auto_osd || (on_osd & MP_ON_OSD_BAR);
|
bool bar_osd = auto_osd || (on_osd & MP_ON_OSD_BAR);
|
||||||
bool msg_or_nobar_osd = msg_osd && !(auto_osd && opts->osd_bar_visible);
|
|
||||||
int osdl = msg_osd ? 1 : OSD_LEVEL_INVISIBLE;
|
int osdl = msg_osd ? 1 : OSD_LEVEL_INVISIBLE;
|
||||||
bool async = cmd->flags & MP_ASYNC_CMD;
|
bool async = cmd->flags & MP_ASYNC_CMD;
|
||||||
|
|
||||||
@ -4887,7 +4886,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
|
|||||||
}}
|
}}
|
||||||
if (bar_osd)
|
if (bar_osd)
|
||||||
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
|
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
|
||||||
if (msg_or_nobar_osd)
|
if (msg_osd)
|
||||||
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
|
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -4908,7 +4907,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
|
|||||||
set_osd_function(mpctx, OSD_REW);
|
set_osd_function(mpctx, OSD_REW);
|
||||||
if (bar_osd)
|
if (bar_osd)
|
||||||
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
|
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
|
||||||
if (msg_or_nobar_osd)
|
if (msg_osd)
|
||||||
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
|
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
@ -5104,7 +5103,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
|
|||||||
set_osd_function(mpctx, (a[0] > refpts) ? OSD_FFW : OSD_REW);
|
set_osd_function(mpctx, (a[0] > refpts) ? OSD_FFW : OSD_REW);
|
||||||
if (bar_osd)
|
if (bar_osd)
|
||||||
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
|
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_BAR;
|
||||||
if (msg_or_nobar_osd)
|
if (msg_osd)
|
||||||
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
|
mpctx->add_osd_seek_info |= OSD_SEEK_INFO_TEXT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user