Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实时监控摄像rtmp格式此视频暂无法播放,请稍后在试 #243

Closed
zhj5357 opened this issue Jan 11, 2019 · 2 comments
Closed

Comments

@zhj5357
Copy link

zhj5357 commented Jan 11, 2019

flash也引入了,但还是不行,其他格式可播,唯独rtmp不行,提示:此视频暂无法播放,请稍后在试。求高手解惑

@labnize
Copy link

labnize commented Apr 24, 2019

playerOptions: {
autoplay: false, // 如果true,浏览器准备好时开始回放。
muted: false, // 默认情况下将会消除任何音频。
loop: false, // 导致视频一结束就重新开始。
preload: 'auto', // 建议浏览器在加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
language: 'zh-CN',
aspectRatio: '4:3', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
techOrder: ['flash', 'html5'],
flash: { hls: { withCredentials: false } },
html5: { hls: { withCredentials: false } },
sources: [{
type: 'rtmp/mp4',
// src: 'rtmp://36.248.23.130:50005/live/streamname', // 你的m3u8地址(必填
src: 'rtmp://v.kitebeam.com/live/9846_8d8efcdb64f59f43a095' // 你的m3u8地址(必填
}],
poster: '/img/ces.png', // 你的封面地址
notSupportedMessage: '此视频暂无法播放,请稍后再试', // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
controlBar: {
timeDivider: true,
durationDisplay: true,
remainingTimeDisplay: false,
fullscreenToggle: true // 全屏按钮
}
}

安装完vue-video-player后,需要单独安装videojs-flash。
我用yarn安装后,一直也报这两个错。
后来发现是版本不匹配的问题,进行了版本降级。目前vue-video-player使用的是@5.0.1,videojs-flash使用的是@2.1.0。不报错了。
用npm安装,也不会出现报错。

@surmon-china
Copy link
Owner

The original vue-video-player package is no longer maintained, please upgrade to @videojs-player/vue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants