videojs-flow
videojs-flow(flv live over websocket), low latency live streaming plugin for videojs.
+---------------+ +----------------+ +--------------+ +----------------------+
| videojs(MSE) +---<---+ videojs-flow +---<---+ demo/mse.go +--<-----+ Media Server +
+---------------+ + (js flv2mp4) + + (http to ws) + + (http flv live) +
+----------------+ +--------------+ +----------------------+
Remark: Please use bilibili/flv.js for videojs-flow.
Usage
To check your browser whether support MSE, click here.
To start SRS with a live stream http://localhost:8081/live/livestream.flv
, please read here.
To run demo/mse.go
to transmux HTTP-FLV to WebSocket-FLV ws://localhost:8080/live/livestream.flv
:
go get golang.org/x/net/websocket &&
go run mse.go -l 8080 -b 8081
Links
H5 capabilities:
About Websocket:
- https://tools.ietf.org/html/rfc6455
- https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
- https://en.wikipedia.org/wiki/WebSocket
- http://caniuse.com/#search=websocket
About MSE(Media Source Extension):
- https://www.w3.org/TR/media-source
- https://developer.mozilla.org/en-US/docs/Web/API/MediaSource
- https://en.wikipedia.org/wiki/Media_Source_Extensions
- http://caniuse.com/#feat=mediasource
About Videojs:
Remark: The MSE(Chrome) requires segment starts with keyframe, read videojs.
Winlin 2016