andy-portmen / native-client

Native Messaging component for Windows, Linux, and Mac OS that is written in NodeJS.
https://add0n.com/open-in.html
Mozilla Public License 2.0
727 stars 474 forks source link

VLC Launch Arguments #103

Open Kamiikaze opened 3 years ago

Kamiikaze commented 3 years ago

I'm using the chrome plugin to open web streams in vlc. But all streams are named master.m3u8 or random-numbers.mp4 So I tried inspecting the plugin and figured out how the streams get opened.

Native.prototype.exec = function (command, args, callback = function () {}) { args[1] = ' :meta-title="I bims da"'; console.log(command, args, callback); this.callback = function (res) { callback(res); }; this.channel.postMessage({ cmd: "exec", command, arguments: args, }); }; command is the path to vlc player and args is the stream url.

Via commandline it's easy to set the :meta-title="Custom Title" but when I try it in script it doesn't work. So how I can launch VLC with arguments?

andy-portmen commented 3 years ago

Instead of actual VLC, ask the extension to send the URL to a batch/shell script.

vlc --meta-title "My Title" ...