mpv-player / mpv-player/mpv

mp.osd_message feature request

Open
#7,031 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

meta:feature-request scripting
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

I'm new in scripting for mpv, and use mp.osd_message in my scripts in javascript and every time i execute mp.osd_message previous message is cleared. So it will be cool if previous message is stay on screen based on it's timeout, and next will be shown in new line, so scripts will not interrupt each other messages. And even if user made multiple actions catched by one separate script - he can view all messages and not only last one. I can use internal loop for it with array of texts with timeouts and hack with mp.osd_message(resultTextWithNewLines, 999) and mp.osd_message("", 0), but it looks not good and will break other scripts output. Maybe i still don't get some best practice of scripting for mpv. Sorry for my bad english. By the way, awesome api, thanks for javascript support.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the documented mp.osd_message behavior and the JavaScript scripting API, then inspect the existing OSD-message handling path. Define how messages from separate scripts are queued, timed, ordered, and cleared without breaking current callers; done means each message remains visible for its timeout and later messages appear on new lines as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.