javascript 桌面 Safari 浏览器和 HTTP 直播
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7704293/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Desktop Safari browser and HTTP Live streaming
提问by STeN
I suppose the Safaribrowser is supporting the HLS. I quickly tried it but streaming was not started - Is anything wrong with mycode?
我想Safari浏览器支持 HLS。我很快就试过了,但流媒体没有开始 - 我的代码有什么问题吗?
<html>
<head>
<title>HTTP Live Streaming</title>
</head>
<body>
<video controls src="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8">
</video>
</body>
</html>
I am using the Windows version of the Safari browser 5.0.3.
我使用的是 Safari 浏览器 5.0.3 的 Windows 版本。
Thanks STeN
谢谢 STEN
采纳答案by WB2ISS
HTTP Live Streaming is supported on Safari on Mac through Quicktime X which is available on Snow Leopard and Lion. Quicktime 7 is also used on Mac for media functions that are not yet available in Quicktime X. On Windows, Quicktime 7 is available but not Quicktime X. So Safari on Windows does not support HTTP Live Streaming.
Mac 上的 Safari 通过 Quicktime X 支持 HTTP Live Streaming,Quicktime X 在 Snow Leopard 和 Lion 上可用。Quicktime 7 在 Mac 上也用于 Quicktime X 中尚不可用的媒体功能。在 Windows 上,Quicktime 7 可用但 Quicktime X 不可用。因此 Windows 上的 Safari 不支持 HTTP Live Streaming。
回答by Paulo Capelo
I was reading the apples documentation and I found that you can define alternate sources
我正在阅读苹果文档,我发现您可以定义替代来源
something like this:
像这样:
<!DOCTYPE html>
<html>
<head>
<title>Multi-Scheme Video Player</title>
</head>
<body>
<video controls autoplay >
<source src="http://HttpLiveStream.m3u8">
<source src="rtsp://LegacyStream.3gp">
<source src="http://ProgressiveDownload.m4v">
</video>
</body>
</html>
You could try it with just one source.
您可以仅使用一个来源进行尝试。
But I also found some information suggesting to use httlive:// instead of http://
但我也发现一些信息建议使用 httlive:// 而不是 http://