Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open link using VLC on OSX

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.

like image 735
Matt Joiner Avatar asked Jan 15 '16 02:01

Matt Joiner


People also ask

How do I open a link in VLC?

Open and Play a Stream Make sure you are using the latest version of the VLC player. Click Media on the task bar followed by Open Network Stream. This will open a prompt with a box for the network URL. Type your network URL into this box to retrieve the stream.

How do I open VLC files on Mac?

Mac. Right-click on the type of file you want to always open with VLC. Click 'Get Info'. In the 'Open With' section, select VLC from the drop-down menu.

Can you use VLC on Mac?

VLC media player requires Mac OS X 10.7. 5 or later. It runs on any Mac with a 64-bit Intel processor or an Apple Silicon chip. Previous devices are supported by older releases.


1 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.

like image 59
Kyrylo Polezhaiev Avatar answered Oct 05 '22 22:10

Kyrylo Polezhaiev