如何将 hsl 流实现到 hbbtv</desc> <question vote="0"> <p>问题是在 HbbTV 中实现 HTTP Live Streaming(也称为 HLS) 我找不到解决方案</p> <p>我试过这个例子</p> <pre><code><!DOCTYPE html> <html> <head> <title>HbbTV Stream</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript"> function initApp() { var videoElement = document.createElement("video"); videoElement.setAttribute("type", "application/vnd.apple.mpegurl"); videoElement.setAttribute("src", "http.//example.com/test.m3u8"); videoElement.setAttribute("data-fullscreen", "true"); videoElement.setAttribute("data-pauseonexit", "true"); videoElement.setAttribute("autoplay", ""); videoElement.addEventListener("error", function(e) { console.log("Video error:", e); }); document.body.appendChild(videoElement); } </script> </head> <body onload="initApp()"> </body> </html> </code></pre> </question> </body></html>

问题描述 投票:0回答:0
javascript html http-live-streaming hbbtv
© www.soinside.com 2019 - 2024. All rights reserved.