mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 18:41:20 -08:00
feat: Update Artplayer initialization in documentation
This commit is contained in:
1 parent
0cee288097
commit
c6b6e13799
2 files changed
+14
-18
No files matched your search
@@ -40,15 +40,6 @@ https://unpkg.com/artplayer/dist/artplayer.js
|
|||||||
|
|
||||||
::: code-group
|
::: code-group
|
||||||
|
|
||||||
```js [index.js]
|
|
||||||
import Artplayer from 'artplayer';
|
|
||||||
|
|
||||||
const art = new Artplayer({
|
|
||||||
container: '.artplayer-app',
|
|
||||||
url: 'path/to/video.mp4',
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
```html [index.html]
|
```html [index.html]
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -63,6 +54,13 @@ const art = new Artplayer({
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="artplayer-app"></div>
|
<div class="artplayer-app"></div>
|
||||||
|
<script src="path/to/artplayer.js"></script>
|
||||||
|
<script>
|
||||||
|
const art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: 'path/to/video.mp4',
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -40,15 +40,6 @@ https://unpkg.com/artplayer/dist/artplayer.js
|
|||||||
|
|
||||||
::: code-group
|
::: code-group
|
||||||
|
|
||||||
```js [index.js]
|
|
||||||
import Artplayer from 'artplayer';
|
|
||||||
|
|
||||||
const art = new Artplayer({
|
|
||||||
container: '.artplayer-app',
|
|
||||||
url: 'path/to/video.mp4',
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
```html [index.html]
|
```html [index.html]
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -63,6 +54,13 @@ const art = new Artplayer({
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="artplayer-app"></div>
|
<div class="artplayer-app"></div>
|
||||||
|
<script src="path/to/artplayer.js"></script>
|
||||||
|
<script>
|
||||||
|
const art = new Artplayer({
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: 'path/to/video.mp4',
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in new issue
Block a user