1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <meta name="author" content="GaryWang"> <meta name='renderer' content='webkit'> <meta http-equiv='X-UA-Compatible' content='IE=Edge,chrome=1'> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="email=no"> <title></title> <link rel="stylesheet" href="https://cdn.plyr.io/3.6.12/plyr.css" /> </head> <body> <section class="wrap"> <article> <video id="player" playsinline controls autoplay="autoplay" style="width: 100%;"> </video> </article> <section class="list"> <div> 阅兵1 </div> <div> 阅兵2 </div> <div> 阅兵3 </div> <div> 阅兵4 </div> </section> </section> <script src="js/jquery-1.11.3.min.js"></script> <script src="https://cdn.plyr.io/3.6.12/plyr.polyfilled.js"></script> <script type="text/javascript"> var player = new Plyr('#player'); function play(n) { player.source = { type: 'video', title: 'title', sources: [ { src: `./media/video${n}.mp4`, type: 'video/mp4', size: 720, } ] } } play(0) $('.list div').click(function(){ var index = $(this).index(); play(index) }) </script> </body> </html>
|