当前位置:网站首页>视频切换播放的例子(视频切换范例)代码
视频切换播放的例子(视频切换范例)代码
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>实现点击一个播放一个的切换视频效果。
边栏推荐
猜你喜欢

The evolution of content products has three axes: traffic, technology, and product form

瑞吉外卖项目实战Day02

PyQt5快速开发与实战 9.1 使用PyInstaller打包项目生成exe文件

一文读懂网络效应对Web3的重要意义

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

阿里CTO程立:阿里巴巴的开源历程、理念和实践

算力顶天地,存力纳乾坤:国家超级计算济南中心的一体两面

四大首搭加持,美学、安全、操控、效率优势明显,比亚迪海豹售价20.98万元起售!

Why did I switch from developer to testing, 3 years software testing engineer, tell you the secret of this
4位资深专家多年大厂经验分享出Flink技术内幕架构设计与实现原理
随机推荐
Flink优化
容器排序案例
Desktop Software Development Framework Awards
CVE-2022-33891 Apache Spark 命令注入复现
JVM性能调优
1700. 无法吃午餐的学生数量
浅析显卡市场的未来走向:现在可以抄底了吗?
MASM32v11编程调用Process32First失败: 程序发出命令,但命令长度不正确
元宇宙邮局AI航天主题系列数字藏品 将于7月30日10:00点上线“元邮数藏”
机房布线的至高境界,美到窒息
有关收集箱的改进建议
CS内网横向移动 模拟渗透实操 超详细
CMake库搜索函数居然不搜索LD_LIBRARY_PATH
MaxWell抓取数据
查阅所连接过的WiFi所有信息(含密码)(访问历史所有WiFi连接)
Kubernetes应用管理深度剖析
Flink optimization
SSE for Web Message Push
Fink异步IO的实战(关联维表)
Flink real-time data warehouse completed