mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.67k stars 2.83k forks source link

osc.lua: add script message to show up the OSC #14358

Closed CrendKing closed 2 weeks ago

CrendKing commented 2 weeks ago

Add a way to briefly show the OSC, which is useful to check file name, playback progress and time left, etc.

Fix issue #3826

github-actions[bot] commented 2 weeks ago

Download the artifacts for this pull request:

Windows * [mpv-i686-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1604133465.zip) * [mpv-x86_64-w64-mingw32](https://nightly.link/mpv-player/mpv/actions/artifacts/1604135111.zip) * [mpv-x86_64-windows-msvc](https://nightly.link/mpv-player/mpv/actions/artifacts/1604140366.zip)
macOS * [mpv-macos-12-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1604133459.zip) * [mpv-macos-13-intel](https://nightly.link/mpv-player/mpv/actions/artifacts/1604132591.zip) * [mpv-macos-14-arm](https://nightly.link/mpv-player/mpv/actions/artifacts/1604131289.zip)
na-na-hi commented 2 weeks ago

This also fixes #2891, #7891

CrendKing commented 2 weeks ago

Yeah. Feels this small change is long overdue. Now the popularly requested "show OSC on X event" is as simple as

mp.register_event('X', function ()
    mp.commandv('script-message', 'osc-show')
end)