[英]Video stream of H.264(avc1.640029) type won't play on Safari
Description描述
Here is my demo website and m3u8 source这是我的演示网站和 m3u8 源
Demo: https://codepen.io/shaoyulan/pen/wvXQoQM演示: https://codepen.io/shaoyulan/pen/wvXQoQM
Strem source: https://stream.huskyking.com/stream/43d1bf49-1769-41f0-ac51-88e6f35d5fc9/index.m3u8流源: https://stream.huskyking.com/stream/43d1bf49-1769-41f0-ac51-88e6f35d5fc9/index.m3u8
The problem问题
And it's run perfectly at android or windows chrome But got ERROR (CODE:3 MEDIA_ERR_DECODE) at safari Both iphone and mac它在 android 或 windows chrome 上完美运行但在 safari 出现错误(代码:3 MEDIA_ERR_DECODE) iphone 和 mac
Reduced test case减少测试用例
https://codepen.io/shaoyulan/pen/wvXQoQM https://codepen.io/shaoyulan/pen/wvXQoQM
<video id="video" controls autoplay muted>
<source
type="application/x-mpegURL"
src="https://stream.huskyking.com/stream/43d1bf49-1769-41f0-ac51-88e6f35d5fc9/index.m3u8"
>
</video>
Steps to reproduce重现步骤
What browser(s) including version(s) does this occur with?什么浏览器(包括版本)会发生这种情况?
All Sarari version所有 Sarari 版本
What OS(es) and version(s) does this occur with?发生这种情况的操作系统和版本是什么?
Safari Both on Iphone and Mac Safari Iphone 和 Mac 都可以
What is expected?预期是什么?
The stream is expected to playable on safari.预计 stream 可在 safari 上播放。
From research... Safari has built-in M3U8 playback on <video>
tag.来自研究... Safari 在
<video>
标签上内置了 M3U8 播放。 So at any time, you don't need and cannot use this HLS.js with it (because an important API for playing custom bytes, needed by HLS.js , is not available or not supported by the Safari browser).因此,在任何时候,您都不需要也不能将此HLS.js与它一起使用(因为 HLS.js 所需的用于播放自定义字节的重要API不可用或不受 Safari 浏览器支持)。
Try this code in Safari (I cannot test it myself):在 Safari 中尝试这段代码(我自己无法测试):
<!DOCTYPE html>
<html>
<body>
<video width="640" height="400" controls>
<source
type="application/x-mpegURL"
src="https://yioushen-camera.muki001.com/stream/82a4899f-d803-4567-b7c5-221977e14646/index.m3u8" >
</video>
</body>
</html>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.