mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
97 lines
2.9 KiB
HTML
97 lines
2.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: '.artplayer-app',
|
|
url: 'https://blog.zhw-island.com/cdn-assets/video/YUI-Again-subbed-web.mp4',
|
|
poster: './img/poster.png',
|
|
subtitle: {
|
|
url: './subtitle/dw_trailer_low.vtt'
|
|
},
|
|
thumbnails: {
|
|
url: './img/thumbnails.jpg',
|
|
number: 100,
|
|
width: 160,
|
|
height: 90
|
|
},
|
|
highlight: [
|
|
{
|
|
time: 20,
|
|
text: '123456789'
|
|
},
|
|
{
|
|
time: 120,
|
|
text: '123456789'
|
|
}
|
|
]
|
|
});
|
|
|
|
player.layers.add({
|
|
html: '23333',
|
|
index: 999,
|
|
name: 'test',
|
|
style: {
|
|
'color': 'red'
|
|
}
|
|
}, dom => {
|
|
console.log(dom)
|
|
});
|
|
|
|
console.dir(Artplayer);
|
|
|
|
console.log(player);
|
|
|
|
Artplayer.config.video.events.forEach(item => {
|
|
player.on('video:' + item, event => {
|
|
console.log('video', event);
|
|
});
|
|
});
|
|
|
|
Artplayer.config.mse.mediaSource.events.forEach(item => {
|
|
player.on('mediaSource:' + item, event => {
|
|
console.log('mediaSource', event);
|
|
});
|
|
});
|
|
|
|
Artplayer.config.mse.sourceBufferList.events.forEach(item => {
|
|
player.on('sourceBuffers:' + item, event => {
|
|
console.log('sourceBuffers', event);
|
|
});
|
|
player.on('activeSourceBuffers:' + item, event => {
|
|
console.log('activeSourceBuffers', event);
|
|
});
|
|
});
|
|
|
|
Artplayer.config.mse.sourceBuffer.events.forEach(item => {
|
|
player.on('sourceBuffer:' + item, event => {
|
|
console.log('sourceBuffer', event);
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |