mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
54 lines
1.6 KiB
HTML
54 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
|
|
<head>
|
|
<title>Artplayer</title>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0,minimal-ui">
|
|
<meta name="keywords" content="artplayer">
|
|
<meta name="description" content="artplayer">
|
|
<link rel="shortcut icon" href="./img/favicon.ico">
|
|
<link rel="stylesheet" href="./css/normalize.css">
|
|
<link rel="stylesheet" href="./css/app.css">
|
|
<link rel="stylesheet" href="./css/artplayer.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div class="app">
|
|
<div class="title">ArtPlayer</div>
|
|
<div class="description">ArtPlayer is a modern HTML5 video player</div>
|
|
<div class="github">
|
|
<a href="https://github.com/zhw2590582/artplayer">GITHUB</a>
|
|
</div>
|
|
<div class="artplayer-app"></div>
|
|
</div>
|
|
<script src="./js/artplayer.js"></script>
|
|
<script>
|
|
var player = new Artplayer({
|
|
container: document.querySelector('.artplayer-app'),
|
|
url: './video/frag_bunny.mp4',
|
|
poster: 'http://s2.pstatp.com/cdn/expire-1-M/byted-player-videos/1.0.0/poster.jpg'
|
|
});
|
|
|
|
player.on('video:canplay', event => {
|
|
console.log(event);
|
|
});
|
|
|
|
player.on('video:play', event => {
|
|
console.log(event);
|
|
});
|
|
|
|
player.on('video:progress', event => {
|
|
console.log(event);
|
|
});
|
|
|
|
player.on('video:pause', event => {
|
|
console.log(event);
|
|
});
|
|
|
|
console.log(player);
|
|
</script>
|
|
</body>
|
|
|
|
</html> |