问题里要求支持 rtmp 播放,我的第一反应是:啥?浏览器能支持 rtmp 协议?
然后仔细去看了看 video.js 的文档
https://github.com/videojs/video.js/blob/master/docs/guides/faq.md#q-how-can-i-play-rtmp-video-in-videojsQ: How can I play RTMP video in Video.js?
RTMP requires Flash to play back. You'll need both a browser that supports Flash and the Flash tech.
In Video.js version 6, the Flash tech is not included by default and is available as a separate videojs-flash package. In previous versions it was builtin to Video.js.
(此处省略两行)
Bear in mind that mobile browsers do not support Flash, and modern desktop browsers make it increasingly difficult to use Flash or disable it by default for your end users. Consider moving to a modern format such as HLS or DASH.
所以 video.js 的 rtmp 播放是用 Flash 实现的。。
个人觉得,还是直接把 rtmp 丢了,换个其他的播放方法吧,“ Consider moving to a modern format such as HLS or DASH.”