简体   繁体   English

以HTML5 / JS流式传输视频

[英]Streaming video in HTML5/JS

I currently have an IPTV subscription and as a fun little side project I decided to create a multiplatform IPTV app. 我目前有一个IPTV订阅,作为一个有趣的小项目,我决定创建一个多平台IPTV应用程序。 However, I'm running into some trouble when trying to stream video. 但是,尝试流式传输视频时遇到了一些麻烦。

The .m3u playlist I am currently using has streaming links, however they do not end in .m3u8 as I am usually accustom to. 我当前使用的.m3u播放列表具有流链接,但是它们并不像我通常习惯的那样以.m3u8结尾。

When I do a get request to the link in insomnia, it begins to download content with a MIME type of video/mp2t. 当我在失眠中对链接进行请求时,它开始下载MIME类型为video / mp2t的内容。

I have tried using hls.js along with a few other html video players however I cannot seem to get it to work. 我已经尝试将hls.js与其他一些html视频播放器一起使用,但是我似乎无法使其正常工作。

The playlist does work with VLC! 播放列表可以在VLC中使用!

I feel like I am missing something, just not sure what. 我觉得我想念什么,只是不确定。

Thanks!! 谢谢!!

If your IPTV service has content that the service provider wants to restrict then they may encrypt the content, use DRM and/or obfuscate the access to the manifest files and segments streams. 如果您的IPTV服务包含服务提供商要限制的内容,则他们可以加密内容,使用DRM和/或混淆对清单文件和分段流的访问。

The reason they do this is to ensure that only their apps can be used to playback the content - this does not always have to be just for paid services as the content owner may require the content to be encrypted even for free IPTV services. 他们这样做的原因是为了确保只能使用他们的应用程序来播放内容-这并不总是仅用于付费服务,因为内容所有者甚至可能要求对内容进行加密,即使是免费IPTV服务也是如此。

You can still do your experiment and build your multiscreen project using test streams which are available online - there are both DASH and HLS online streams available in a number of places. 您仍然可以使用在线测试流进行实验并构建多屏项目-许多地方都提供DASH和HLS在线流。 see here for a useful list: 请参阅此处以获取有用的列表:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM