使用了 rtsp 的时候发现没有反应。 真机测试视频rtmp://live.hkstv.hk.lxdns.com/live/hks就可以 用rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov就不行。都用 VLC 测试过是没有问题的两个视频地址。附上代码
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Hello H5+</title>
<link rel="stylesheet" type="text/css" href="../css/mui.css" />
<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var video = null;
// H5 plus事件处理
function plusReady() {
// 创建视频播放控件
console.log(13)
video = new plus.video.VideoPlayer('video', {
// src: 'rtmp://live.hkstv.hk.lxdns.com/live/hks',
src: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov'
});
video.play();
}
document.addEventListener('plusready', plusReady, false);
</script>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<h1 class="mui-title">视频</h1>
</header>
<div id="video" style="width:100%;height:300px;margin:auto"></div>
</body>
</html>
1 个回复
灰色的灵魂
貌似不支持rtsp,一定要推流到rtmp,再播放,我尝试了几种方式了,都不能直接播放rtsp://流