uosc
uosc copied to clipboard
Input/Write URL (a option in Menu & in Subtitles/Audio Button)

Sure. No objections, but no ETA either :)
Waiting
Here's a script that does what you want, but note that pasting in search menus is not currently supported.
-- open-url.lua
mp.utils = require "mp.utils"
mp.register_script_message("open-url:", function(path)
mp.commandv("script-message-to", "uosc", "close-menu", "open-url")
mp.commandv("loadfile", path)
end)
mp.add_forced_key_binding("F10", "open-url", function()
local script_name = mp.get_script_name()
local json = mp.utils.format_json({
type = "open-url",
title = "http://www.example.com/stream.avi",
items = {
{
title = "Enter a network URL and press Ctrl+Enter",
value = "ignore",
muted = true,
selectable = false
}
},
on_search = {"script-message-to", script_name, "open-url:"},
palette = true,
search_style = "palette",
search_debounce = "submit"
}) or "{}"
mp.commandv("script-message-to", "uosc", "open-menu", json)
end)
Doesn't handle loading links as extra tracks but that's a trivial change if you want that.
Replace loadfile with sub-add, audio-add or video-add.
Just an update: I don't want to add more loading items to subtitle/audio menus, especially not for something like this that won't be used by almost anyone, so it'll have to be as an alt action on the "Load {type}" item, which depends on menu item buttons, which is not implemented yet.
There's still no button or UI so I'll keep this open, but thanks to the commit above, in 5.1 you'll be able to paste in subtitle/audio/video track select menus to automatically load whatever path/url is in the clipboard as current menu track type.
I hope one day you support typing URL also like vlc
funny thing is mpv-android let you load subtitle/audio by typing URL. Check mpv-android app, it even support typing video URL
Just in case, as a tip to the OP, showing that the need for this is rather limited. Dragging and dropping an url on mpv window does it.
I guess this question is asked in Windows but in Linux you can do it by copying the link and in a terminal writing mpv and pasting.
And more specifically in Plasma if we associate html files to mpv, copying the link will open the list of applications associated with html.
typing URL like vlc should be added
I'm clueless why does typing URL like any guide video player software like VLC,Potplayer,Mpc-hc not possible
Patiently waiting @tomasklaen
Waiting
@aicynide Stop being annoying, just use the script from po5's comment.