基于bootstrap實現(xiàn)的HTML5視頻播放器,支持手機(jī)移動頁面,比起傳統(tǒng)的HTML5播放器,功能更強(qiáng)大,效果見以下截圖。
HTML代碼結(jié)構(gòu)示例如下:
HTML代碼結(jié)構(gòu)示例如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<title>HTML5手機(jī)網(wǎng)頁視頻播放器代碼</title>
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/willesPlay.css">
<script src="js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/willesPlay.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<div id="willesPlay">
<div class="playContent">
<div class="turnoff" style="right: -40px;">
<ul>
<li><a href="javascript:;" title="喜歡" class="glyphicon glyphicon-heart-empty"></a></li>
<li><a href="javascript:;" title="關(guān)燈" class="btnLight on glyphicon glyphicon-sunglasses"></a></li>
<li><a href="javascript:;" title="分享" class="glyphicon glyphicon-share"></a></li>
</ul>
</div>
<video id="playVideo" width="100%" height="100%">
<source src="http://220.167.105.121/170/2/11/acloud/151672/letv.v.yinyuetai.com/he.yinyuetai.com/uploads/videos/common/6609014F06AE1C8E99DE142502A2B157.flv" type="video/mp4">
當(dāng)前瀏覽器不支持 video直接播放,點擊這里下載視頻: <a href="/">下載視頻</a>
</video>
<div class="playTip glyphicon glyphicon-play"></div>
</div>
<div class="playControll">
<div class="playPause playIcon"></div>
<div class="timebar">
<span class="currentTime">0:00:00</span>
<div class="progress">
<div class="progress-bar progress-bar-danger progress-bar-striped" role="progressbar" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
</div>
<span class="duration">0:00:00</span>
</div>
<div class="otherControl">
<span class="volume glyphicon glyphicon-volume-down"></span>
<span class="fullScreen glyphicon glyphicon-fullscreen"></span>
<div class="volumeBar" style="display: none;">
<div class="volumewrap">
<div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuemin="0" aria-valuemax="100" style="width: 8px;height: 40%;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>