I've seen that applications like Steam, Spotify, and others, are able to launch native applications from inside Chrome, after the user allows the invocation in the pop up box. How can I do this from my own website, for VLC, or failing that, the default system video streaming application.

- 43,109
- 15
- 131
- 205

- 112,946
- 110
- 377
- 526
-
Possible duplicate of [How to handle with a default URL scheme](http://stackoverflow.com/questions/1991072/how-to-handle-with-a-default-url-scheme) – Alexis King Jan 15 '16 at 04:13
-
By the way, it's not a good idea to assume that users have VLC installed. Also, you can't assume that their system is set to use VLC for RTMP links by default. Unless VLC implements some sort of deep-linking support (and you can always submit a feature request for that!), you can't make any assumption about wether VLC is installed and open it specifically. – ItalyPaleAle Jan 24 '16 at 01:27
2 Answers
Sure, Safari, for example, will open VLC for rtmp://
links like
<a target="_blank" href="rtmp://zozolala.com">text</a>
You can invoke video player from JavaScript:
window.open('rtmp://zozolala.com', '_blank');
You can specify URLs your OS X app can open by adding them to .plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLIconFile</key>
<string></string>
<key>CFBundleURLName</key>
<string>abc</string>
<key>CFBundleURLSchemes</key>
<array>
<string>abc</string>
</array>
</dict>
</array>
If you want to feed your VLC with HTTPS URI (this URI will be opened in Safari by default), you can do a trick: prepare .m3u
playlist file with https://
entry inside and make this file be available via some other protocol (for which default app is VLC), like RSTP or SFTP.

- 16,609
- 6
- 58
- 83

- 1,626
- 11
- 18
-
1
-
HTTPS is a protocol. But if you will specify `https://` scheme, Safari will just open the link inside itself. – Kyrylo Polezhaiev Jan 19 '16 at 10:47
-
-
Just use playlist with single entry, pick any format with seeking support and implement ranged requests on your server. What's the problem with seeking? – Kyrylo Polezhaiev Jan 25 '16 at 10:47
Do not assume the user has VLC installed. To answer exactly your request :
If you are using web technologies, you'll probably have no other choice than a Java plugin, Flash, ActiveX or SilverLight to Exec an external application.
- This one for ActionScript (Flash) : Execute external exe from projector flash
- May be this one for your Java Plugin Executing an external program using process builder or apache commons exec
If you are using native technologies (C/C++, Objective-C, etc). You can use Exec... More specifically, on Mac OSx, you'll probably want to refer to Execute a terminal command from a Cocoa app