如何在给定播放位置上调出 OSD 消息:MPV

有没有人可以愿意帮助一下? 我不是程序员,但我认为这很简单,所以我尝试从 MPV 手册中的一个代码示例中反向工程出一个小的 LUA 脚本,最终得到以下代码,但它不起作用:

function message_on_position(name, value)
if value == 50 then
mp.osd_message("You’ve watched 50% of the video.", "3")
end
end
mp.observe_property("percent-pos", "number", message_on_position)

原文链接 https://stackoverflow.com/questions/70131598

点赞