mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:12:21 -08:00
Update esm.html
This commit is contained in:
1 parent
41040e5ac1
commit
09aab497ac
1 file changed
+6
-3
+6
-3
@@ -6,8 +6,8 @@
|
|||||||
<title>ArtPlayer ESM with Import Map</title>
|
<title>ArtPlayer ESM with Import Map</title>
|
||||||
<style>
|
<style>
|
||||||
#player {
|
#player {
|
||||||
width: 640px;
|
max-width: 720px;
|
||||||
height: 360px;
|
aspect-ratio: 16 / 9;
|
||||||
margin: 50px auto;
|
margin: 50px auto;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,8 @@
|
|||||||
{
|
{
|
||||||
"imports": {
|
"imports": {
|
||||||
"artplayer": "/compiled/artplayer.mjs",
|
"artplayer": "/compiled/artplayer.mjs",
|
||||||
"artplayer-plugin-danmuku": "/compiled/artplayer-plugin-danmuku.mjs"
|
"artplayer-plugin-danmuku": "/compiled/artplayer-plugin-danmuku.mjs",
|
||||||
|
"artplayer-plugin-document-pip": "/compiled/artplayer-plugin-document-pip.mjs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -27,11 +28,13 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
import Artplayer from 'artplayer';
|
import Artplayer from 'artplayer';
|
||||||
import ArtplayerPluginDanmuku from 'artplayer-plugin-danmuku';
|
import ArtplayerPluginDanmuku from 'artplayer-plugin-danmuku';
|
||||||
|
import ArtplayerPluginDocumentPip from 'artplayer-plugin-document-pip';
|
||||||
|
|
||||||
const art = new Artplayer({
|
const art = new Artplayer({
|
||||||
container: '#player',
|
container: '#player',
|
||||||
url: '/assets/sample/video.mp4',
|
url: '/assets/sample/video.mp4',
|
||||||
plugins: [
|
plugins: [
|
||||||
|
ArtplayerPluginDocumentPip(),
|
||||||
artplayerPluginDanmuku({
|
artplayerPluginDanmuku({
|
||||||
danmuku: '/assets/sample/danmuku.xml',
|
danmuku: '/assets/sample/danmuku.xml',
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in new issue
Block a user