当前位置:网站首页>视频切换播放的例子(视频切换范例)代码
视频切换播放的例子(视频切换范例)代码
2022-07-30 14:38:00 【阿酷tony】
视频切换播放的例子(视频切换范例)代码

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5播放器调用范例</title>
<link rel="stylesheet" type="text/css" href="../css/common.css" />
<style type="text/css">
.plist a,.plist a:link,.plist a:visited { cursor:hand;cursor:pointer;display:block; line-height:60px;height:60px; width:180px; border:1px #ccc solid; text-align:center;border-radius:5px; float:left;margin-top:20px; margin-right:10px; color:#666666;}
.plist a:hover { background:#efefef;}
.current a,.current a:link,.current a:visited {background:#0099ff;cursor:hand;cursor:pointer; color:#fff;display:block; line-height:60px;height:60px; width:180px; border:1px #0099ff solid; text-align:center;border-radius:5px; float:left;margin-top:20px; margin-right:10px;}
</style>
</head>
<body>
<div id="player"></div>
<script src="//player.polyv.net/script/player.js"></script>
<script>
var player = polyvPlayer({
wrap: '#player',
width: 900,
height: 600,
volume: 0.75,
vid: '138dcc9667850eba0705401288131bf1_1',
});
function nextVideo(vid,num){
player.changeVid(vid,0,true);
getPlayList(num);
console.log("play== "+num)
}
function getPlayList(step)
{
for(var i=0; i<5; i++)
{
document.getElementById('current_' + i).className = 'plist';
if (step == i)
{
document.getElementById('current_' + i).className = 'current';
}
}
}
</script>
<h1>html5播放器视频切换范例</h1>
<div class="w">
<div id="current_3" class="plist">
<a href="javascript:void(0);" onclick="nextVideo('138dcc96672de50d310b61a288a99679_1','3');">视频4-别克君越</a>
</div>
<div id="current_2" class="plist">
<a href="javascript:void(0);" onclick="nextVideo('138dcc9667f9c0c236963b2c2d394f6a_1','2');">视频3-别克威朗</a>
</div>
<div id="current_1" class="plist">
<a href="javascript:void(0);" onclick="nextVideo('138dcc96670a0728e2ddb6276128d93e_1','1');">视频2-吉利汽车</a>
</div>
<div id="current_0" class="plist">
<a href="javascript:void(0);" onclick="nextVideo('138dcc9667850eba0705401288131bf1_1','0');">视频1-吉利宣传</a>
</div></div>
<div class="clearfix back"><a href="http://www.cuplayer.com/html5player/?f=link-back" class="cGray">返回演示平台</a> </div>
<footer class="clearfix">
<p>2009-2022(C)</p>
</footer>
</body>
</html>实现点击一个播放一个的切换视频效果。
边栏推荐
猜你喜欢

Go to Tencent for an interview and let people turn left directly: I don't know idempotency!

MongoDB starts an error Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)

使用 protobuf 进行数据序列化

Still saying software testing doesn't have a midlife crisis?9 years of test engineers were eliminated

Why did I switch from developer to testing, 3 years software testing engineer, tell you the secret of this

浅析显卡市场的未来走向:现在可以抄底了吗?

学习 MySQL 需要知道的 28 个小技巧

智能合约安全——私有数据访问

【回归预测-CNN预测】基于卷积神经网络CNN实现数据回归预测附matlab代码

Flask框架——Flask-SQLite数据库
随机推荐
关于华为应用市场审核App无法启动的问题
容器排序案例
Flink实时仓库-DWS层(关键词搜索分析-自定义函数,窗口操作,FlinkSql设置水位线,保存数据到Clickhouse)模板代码
Flink optimization
查阅所连接过的WiFi所有信息(含密码)(访问历史所有WiFi连接)
Flink优化
Allure进阶-动态生成报告内容
localhost with 127.0.0.1
Application of time series database in the field of ship risk management
新时代背景下智慧城市的建设与5G技术有何关联
【回归预测-CNN预测】基于卷积神经网络CNN实现数据回归预测附matlab代码
机房布线的至高境界,美到窒息
PyQt5快速开发与实战 9.1 使用PyInstaller打包项目生成exe文件
CVE-2022-33891 Apache Spark 命令注入复现
5G-based Warehousing Informatization Solution 2022
Flink实时仓库-DWS层(状态编程,windowall的使用,数据保存到clickhouse)模板代码
学习 MySQL 需要知道的 28 个小技巧
canal scrape data
异常情况处置方案
泡沫褪去,DeFi还剩下什么