70 lines
2.1 KiB
HTML
70 lines
2.1 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>Title</title>
|
||
|
<link rel="stylesheet" href="css/reset.css">
|
||
|
<link rel="stylesheet" href="css/style.css">
|
||
|
<!--<link rel="stylesheet" href="css/video-js.min.css">-->
|
||
|
<script src="js/rem.js"></script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="app">
|
||
|
<div class="main">
|
||
|
<div class="left full">
|
||
|
<video id="player" autoplay controls :poster="playing.poster" :src="playing.videoPath"></video>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<script src="js/vue.js"></script>
|
||
|
<script src="js/jquery-2.1.4.min.js"></script>
|
||
|
<!--<script src="js/video.min.js"></script>-->
|
||
|
<script src="js/jquery.SuperSlide.2.1.1.js"></script>
|
||
|
<script src="js/nicescroll.js"></script>
|
||
|
<script>
|
||
|
var vue = new Vue({
|
||
|
el: '#app',
|
||
|
data: {
|
||
|
curPlaying: 0,
|
||
|
playing: {},
|
||
|
toTop: 0,
|
||
|
videoList: [
|
||
|
{
|
||
|
poster: 'images/travel-banner1.jpg',
|
||
|
videoPath: 'images/无涯.mp4'
|
||
|
},
|
||
|
{
|
||
|
poster: 'images/travel-banner2.jpg',
|
||
|
videoPath: 'images/oceans.mp4'
|
||
|
},
|
||
|
{
|
||
|
poster: 'images/background.png',
|
||
|
videoPath: 'images/无涯.mp4'
|
||
|
},
|
||
|
{
|
||
|
poster: 'images/travel-banner1.jpg',
|
||
|
videoPath: 'images/无涯.mp4'
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
methods: {},
|
||
|
mounted: function () {
|
||
|
var self = this
|
||
|
this.playing = this.videoList[0]
|
||
|
$('#player').on('ended', function () {
|
||
|
self.curPlaying++
|
||
|
if (self.curPlaying >= self.videoList.length) {
|
||
|
self.curPlaying = 0
|
||
|
}
|
||
|
self.playing = self.videoList[self.curPlaying]
|
||
|
$('#player').prop('src', self.playing.videoPath)
|
||
|
setTimeout(function () {
|
||
|
$('#player').get(0).play()
|
||
|
}, 10)
|
||
|
})
|
||
|
}
|
||
|
})
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|