mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
56 lines
1.7 KiB
HTML
56 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>ArtPlayer.js Lab</title>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
<meta name="keywords" content="artplayer,html5,video,player">
|
|
<meta name="description" content="ArtPlayer is a modern HTML5 video player">
|
|
<link rel="shortcut icon" href="../assets/img/favicon.ico">
|
|
<link rel="stylesheet" href="../assets/css/normalize.css">
|
|
<link rel="stylesheet" href="../uncompiled/artplayer.css">
|
|
<style>
|
|
html, body {
|
|
height: 100%;
|
|
}
|
|
|
|
.container {
|
|
height: 100%;
|
|
padding: 20px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.artplayer-app {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<div class="artplayer-app"></div>
|
|
</div>
|
|
<script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
|
|
<script src="https://cdn.bootcss.com/hls.js/0.10.1/hls.js"></script>
|
|
<script src="../uncompiled/artplayer.js"></script>
|
|
<script>
|
|
var vConsole = new VConsole();
|
|
var art = new Artplayer({
|
|
container: '.artplayer-app',
|
|
whitelist: ['iPhone OS'],
|
|
url: 'https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8',
|
|
customType: {
|
|
m3u8: function(video, url) {
|
|
var hls = new Hls();
|
|
hls.loadSource(url);
|
|
hls.attachMedia(video);
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |