Open VLC Network Streaming from web browser

放肆的年华 提交于 2019-12-13 17:10:15

问题


I have a web server containing video files and client computers that use VLC to view them. Now, in order to view the video, the client must go on the webpage, right click the direct link, copy it, go to VLC, open the Network Stream option and paste the URL in. I know VLC has a web plugin but I don't want to use that.

I am wondering if it is possible, via JavaScript, html, or some other method, to open VLC and copy the video URL to the Network Streaming screen, so my clients simply have to click and watch.


回答1:


This is possible, using a playlist file.

Playlist files, when loaded in a browser, will typically download and automatically launch the associated player. VLC, when installed, will typically register itself as the handler for these types.

For an M3U playlist file, all you really need is a file with a single line, containing the URL of the video you wish to play. You can optionally include some metadata for titling that video:

#EXTM3U
#EXTINF:5000,Super Awesome Example Video Title
http://example.com/videos/super-awesome-example-video.mp4


来源:https://stackoverflow.com/questions/21817510/open-vlc-network-streaming-from-web-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!