代码拉取完成,页面将自动刷新
同步操作将从 OpenSKEYE/SkeyeWebPlayer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width,initial-scale=1.0,user-scalable=no,maximum-scale=1.0,minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,IE=IE9">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SkeyeWebPlayer播放器测试 v2.0.1</title>
<link rel="shortcut icon" href="./favicon.ico">
<link rel="stylesheet" href="./styles/reset.css">
<link rel="stylesheet" href="./static/element-ui/index.css">
<link rel="stylesheet" href="./styles/index.css">
<style>
.play-url-view {
margin-top: 30px;
margin-bottom: 30px;
}
.play-url-item {
display: flex;
align-items: center;
}
.play-url-item + .play-url-item {
margin-top: 10px;
}
.play-url {
width: 100%;
}
.play-btn {
flex-shrink: 0;
margin-left: 10px;
}
</style>
</head>
<body>
<div id="app">
<div class="header-view">
<div class="header-bar">
<div class="container header-group">
<div class="head-title">SkeyeWebPlayer播放器测试 v2.0.1</div>
</div>
</div>
</div>
<section v-cloak class="container">
<div class="doc margin-top">
<a href="https://openskeye.blog.csdn.net/article/details/124581886" target="_blank">
在线使用文档 https://openskeye.blog.csdn.net/article/details/124581886
</a>
</div>
<div class="margin-top"></div>
<!--播放器容器-->
<div id="WebMediaPlayer"></div>
<div class="play-url-view">
<div class="play-url-item" v-for="(item,index) in lists">
<div class="play-url">
<el-input v-model="item.url" size="medium" placeholder="请输入播放地址" clearable></el-input>
</div>
<div class="play-btn">
<el-button type="primary" size="medium" @click="handlePlay(item.url)" :disabled="!item.url">播放</el-button>
</div>
</div>
</div>
</section>
</div>
<!-- [if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="./static/vue.min.js"></script>
<script src="./static/element-ui/index.js"></script>
<script src="./static/SkeyeWebPlayer/SkeyeWebPlayer.js"></script>
<script>
new Vue({
el: '#app',
data () {
return {
lists: [
{url: 'http://114.116.122.72:8000/flv/live/34020000001320000104_34020000001320000104_0200000104.flv'},
]
}
},
created () {
},
mounted () {
this.$nextTick(() => {
this.initPlayer()
})
},
methods: {
initPlayer () {
// new WebMediaPlayer(url,domId,callback,options)
this.player = new WebMediaPlayer('', `WebMediaPlayer`, this.callbackFunc, {
cbUserPtr: this,
decodeType: 'auto',
height: true,
openAudio: true
});
},
// 播放器回调方法
callbackFunc (cbType, cbParams) {
if (cbType === 'playbackTime') {
//console.log("当前回放时间: " + cbParams);
} else if (cbType === 'ended') {
console.log("播放结束");
}
console.log("Callback " + cbType + ": " + cbParams);
},
// 播放
handlePlay (url) {
if (this.player) {
this.player.destroy()
this.initPlayer()
this.player.play(url, 1, 0);
}
},
handleClick (type) {
if (type === 'stop') {
this.player.stop()
}
}
}
})
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。