mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
36 lines
703 B
HTML
36 lines
703 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>ArtPlayer ESM with Import Map</title>
|
|
<style>
|
|
#player {
|
|
width: 640px;
|
|
height: 360px;
|
|
margin: 50px auto;
|
|
border: 1px solid #ccc;
|
|
}
|
|
</style>
|
|
<script type="importmap">
|
|
{
|
|
"imports": {
|
|
"artplayer": "/compiled/artplayer.esm.js"
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="player"></div>
|
|
<script type="module">
|
|
import Artplayer from 'artplayer';
|
|
|
|
const art = new Artplayer({
|
|
container: '#player',
|
|
url: '/assets/sample/video.mp4',
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |