Tizen Samsung SDK:如何播放 HLS 视频?

Tizen Samsung SDK: How do you play HLS video?

http://www.samsungdforum.com/TizenGuide/?FolderName=tizen61&FileName=index.html#/TizenGuide/?Foldername=tizen61&Filename=index.html

上面说:

You have two options for multimedia player in Tizen application.

■Use HTML5 tag. It doesn’t support DRMs and streaming engines like DASH, HAS, HLS and SmoothStreaming.

■Use avplay API or Samsung TV product API. It supports DRMs and streaming engines like DASH, HAS, HLS and SmoothStreaming.

这是真的吗?他们说这是一个私有 SDK,这就是为什么我在网上看不到任何对它的引用的原因吗?我们是否需要私有 sdk 来流式传输 HLS,还是仅用于花哨的播放器?

HTML5 视频标签在 Tizen 平台上不支持 HLS。

您需要使用 AVPlay API 来播放流媒体或 DRM 内容。

尝试在您的模拟器中测试 AVPlay (Video Play) Sample

config.xml 必须满足:

<access origin="*" subdomains="true"/>
<tizen:privilege name="http://tizen.org/privilege/internet"/>

在 head html 文件中包括:

JS:

var init = function () {
    console.log('init() called');
    var videos = document.querySelector('video');
   videos[0].play();
};

window.onload = init;

HTML:

<body>
    <video src="file.m3u8" controls></video>
</body>

另请参阅此示例:https://github.com/SamsungDForum/PlayerHTML5