简体   繁体   English

如何在 HTML 播放器上播放 stream 实时 TS(传输流)文件?

[英]How to stream live TS (transport stream) files on HTML player?

I want to stream a transport stream file on a HTML player.我想在 HTML 播放器上传输 stream 文件 stream 。 Is there a way to implement it?有没有办法实现它?

I have tried these following approaches to play the TS file-我尝试了以下这些方法来播放 TS 文件-

a) Put it in a video tag: I simply wrote a video tag But it showed me a blank screen. a)把它放在一个视频标签中:我只是写了一个视频标签,但它给我显示了一个空白屏幕。

b) I tried it with iframe tag: b) 我用 iframe 标签试了一下:

I wrote a simple tag: It actually downloaded the file but screen turned blank.我写了一个简单的标签:它实际上下载了文件,但屏幕变成空白。

c) I used HLS player for showing the ts file The HLS (hls.js) validated the file. c) 我使用 HLS 播放器显示 ts 文件 HLS (hls.js) 验证了文件。 However it gave me the "manifestLoadError".但是它给了我“manifestLoadError”。

Can anyone helpe me with this HLS error?谁能帮我解决这个 HLS 错误? Or suggest me another way to show this TS file?或者建议我另一种方式来显示这个 TS 文件?

Browsers can not play ts.浏览器无法播放ts。 You need to convert to iso/fmp4 before playing.您需要在播放前转换为 iso/fmp4。

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

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