代码拉取完成,页面将自动刷新
You need to provide a livestream URL in MediaDataSource
and indicates isLive: true
.
Sample HTTP FLV source:
{
// HTTP FLV
"type": "flv",
"isLive": true,
"url": "http://127.0.0.1:8080/live/livestream.flv"
}
Or a WebSocket source:
{
// FLV over WebSocket
"type": "flv",
"isLive": true,
"url": "ws://127.0.0.1:9090/live/livestream.flv"
}
You must configure Access-Control-Allow-Origin
header correctly on your stream server.
See cors.md for details.
Due to IO restrictions, flv.js can support HTTP FLV live stream on Chrome 43+
, FireFox 42+
, Edge 15.15048+
and Safari 10.1+
for now.
HTTP FLV live stream relies on stream IO, which has been introduced in fetch and stream spec. Now FetchStreamLoader
works well on most of the modern browsers:
FetchStreamLoader
works well on Chrome 43+fetch
support but stream
is missing, moz-chunked-arraybuffer
xhr extension is usedfetch + stream
is broken on old version of Microsoft Edge, see Fetch API with ReadableStream has bug with data pumping. Got fixed in Creator Update (RS2).FetchStreamLoader
works well since Safari 10.1 (macOS 10.12.4)此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。