Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
522 views
in Technique[技术] by (71.8m points)

media player - How to open a video stream in an application from HTML

I'm working on a media-streaming software, and I already made apps for multiple platforms, but I'm now trying to port it to the web.

I know that I could transcode content into an mp4 or webm formats that browser supports, but I'd rather move the processing to client-side.

I can "open" a stream, where it asks me to open or save the file, but if I select "open", it downloads it fully and then opens in the media player of choice. The server does support content streaming, so it looks like a waste of having to download it fully to open it.

Is there a way I could open a video stream in a media player (vlc, mpv.io, mpc-hc, ...) without needing manual user intervention (copy-pasting the streaming URL into the player)?

question from:https://stackoverflow.com/questions/66048375/how-to-open-a-video-stream-in-an-application-from-html

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Use this

     <param name="vid" value="http://server.example.com/video1.mpeg"/>
     <embed type="application/x-vlc-plugin" name="video"
     autoplay="no" loop="no" width="400" height="320"
     target="https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_1280_10MG.mp4" />
</object>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...