1 Star 0 Fork 38

WTS/SkeyeWebPlayer

forked from OpenSKEYE/SkeyeWebPlayer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
demo.html 2.16 KB
一键复制 编辑 原始数据 按行查看 历史
YWL 提交于 2022-07-07 16:48 . 更新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SkeyeWebPlayer播放器测试 v2.0.1</title>
<link rel="shortcut icon" href="./favicon.ico">
<link rel="stylesheet" href="./styles/reset.css">
<link rel="stylesheet" href="./styles/index.css">
<style>
.play-url {
margin-top: 30px;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.play-url input {
width: 100%;
height: 24px;
padding: 0 10px;
}
.btn {
margin-left: 15px;
padding: 3px 8px;
border-radius: 4px;
background-color: #666;
color: #fff;
flex-shrink: 0;
}
</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 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="SkeyeWebPlayer"></div>
<div class="play-url">
<input type="text" id="url" value="rtsp://192.168.0.111:5555/51010700031310000000/0">
<button class="btn" onclick="play()">播放</button>
</div>
</section>
</div>
<script src="./static/vue.min.js"></script>
<script src="./static/element-ui/index.js"></script>
<script src="./static/SkeyeWebPlayer/SkeyeWebPlayer.js"></script>
<script>
let player = null
initPlayer()
// 初始化播放器
function initPlayer() {
// new WebMediaPlayer(url,domId,callback,options)
player = new WebMediaPlayer('', `SkeyeWebPlayer`, callbackFunc, {
cbUserPtr: this,
decodeType: 'soft'
});
}
// 播放
function play() {
if(player){
player.destroy();
}
let url = document.getElementById('url').value
initPlayer();
player.play(url, 1, 0)
}
// 回调
function callbackFunc(cbType, cbParams) {
console.log(cbType, cbParams)
}
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/vue_wts/skeyewebplayer.git
[email protected]:vue_wts/skeyewebplayer.git
vue_wts
skeyewebplayer
SkeyeWebPlayer
2.0.1

搜索帮助