mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
67 lines
1.9 KiB
HTML
67 lines
1.9 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: './img/poster.png'
|
|
});
|
|
|
|
console.log(player);
|
|
|
|
[
|
|
'abort',
|
|
'canplay',
|
|
'canplaythrough',
|
|
'durationchange',
|
|
'emptied',
|
|
'ended',
|
|
'error',
|
|
'loadeddata',
|
|
'loadedmetadata',
|
|
'loadstart',
|
|
'pause',
|
|
'play',
|
|
'playing',
|
|
'progress',
|
|
'ratechange',
|
|
'seeked',
|
|
'seeking',
|
|
'stalled',
|
|
'suspend',
|
|
'timeupdate',
|
|
'volumechange',
|
|
'waiting'
|
|
].forEach(item => {
|
|
player.on('video:' + item, event => {
|
|
console.log(event);
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |