2020-09-22 11:08:54 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2021-05-31 10:11:25 +08:00
|
|
|
|
<title>EasyPlayer</title>
|
|
|
|
|
|
<script src="./jquery.min.js"></script>
|
|
|
|
|
|
<script src="./EasyPlayer-element.min.js"></script>
|
2020-09-22 11:08:54 +08:00
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
2021-06-18 14:37:01 +08:00
|
|
|
|
<h4 style="width:600px;margin: auto;">EasyPlayer播放器</h4>
|
2020-09-22 11:08:54 +08:00
|
|
|
|
<br>
|
2021-05-31 10:11:25 +08:00
|
|
|
|
<div style="width:600px;margin: auto;">
|
|
|
|
|
|
<easy-player id="player" live="true" show-custom-button="true"></easy-player>
|
|
|
|
|
|
<p>列如:http://127.0.0.1:8080/flv/hls/stream.flv <a href="http://www.easydarwin.org/easyplayer/" target="_blank"> 在线演示</a></p>
|
2021-01-14 15:01:53 +08:00
|
|
|
|
<p style="color:red;font-size: 12px;">注意:本实例需要以服务方式启动 <a href="https://blog.csdn.net/weixin_43194037/article/details/108885134" target="_blank">搭建服务教程</a></p>
|
2020-09-22 11:08:54 +08:00
|
|
|
|
<input type="text" id="value">
|
|
|
|
|
|
<button id="btn">播放</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
var btn = document.getElementById('btn');
|
|
|
|
|
|
// 地址栏
|
|
|
|
|
|
var value = document.getElementById('value');
|
|
|
|
|
|
//播放事件 传入地址播放
|
|
|
|
|
|
btn.onclick = function(){
|
2021-05-31 10:11:25 +08:00
|
|
|
|
$('#player').attr('video-url',value.value)
|
2020-09-22 11:08:54 +08:00
|
|
|
|
}
|
2021-01-14 15:01:53 +08:00
|
|
|
|
|
2020-09-22 11:08:54 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|