当前位置:网站首页>视频切换播放的例子(视频切换范例)代码
视频切换播放的例子(视频切换范例)代码
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>实现点击一个播放一个的切换视频效果。
边栏推荐
- 异常情况处置方案
- 关于MySQL主从复制的数据同步延迟问题
- 1700. 无法吃午餐的学生数量
- Start learning C language
- SSE for Web Message Push
- 阿里CTO程立:阿里巴巴的开源历程、理念和实践
- 4位资深专家多年大厂经验分享出Flink技术内幕架构设计与实现原理
- English语法_不定代词 - both / either / neither
- Metaverse Post Office AI space-themed series of digital collections will be launched at 10:00 on July 30th "Yuanyou Digital Collection"
- 分布式限流 redission RRateLimiter 的使用及原理
猜你喜欢

Lock wait timeout exceeded解决方案

Distributed pre-course: MySQL implements distributed locks

Huawei issues another summoning order for "Genius Boys"!He, who had given up an annual salary of 3.6 million, also made his debut

Start learning C language

Flink实时数仓完结

那些破釜沉舟入局Web3.0的互联网精英都怎么样了?

三电系统集成技术杂谈

泡沫褪去,DeFi还剩下什么

开源工具推荐:高性能计算辅助工具MegPeak

A Small Case About Containers
随机推荐
LeetCode_数位枚举_困难_233.数字 1 的个数
Smart Contract Security - Private Data Access
A Small Case About Containers
localhost with 127.0.0.1
吃透Chisel语言.29.Chisel进阶之通信状态机(一)——通信状态机:以闪光灯为例
Androd 跳转到google应用市场
The evolution of content products has three axes: traffic, technology, and product form
Could not acquire management access for administration
What is Ts?
DDS Arbitrary Waveform Output Based on FPGA
Fink异步IO的实战(关联维表)
华为无线设备Mesh配置命令
MySql报错:SqlError(Unable to execute query“, “Can‘t create/write to file OS errno 2 - No such file...
深入浅出零钱兑换问题——背包问题的套壳
Installing and Uninstalling MySQL on Mac
MongoDB启动报错 Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)
Understand Chisel language. 28. Chisel advanced finite state machine (2) - Mealy state machine and comparison with Moore state machine
Our company has used gateway services for 6 years, dynamic routing, authentication, current limiting, etc., a stable batch!
5G-based Warehousing Informatization Solution 2022
CMake库搜索函数居然不搜索LD_LIBRARY_PATH