chore: Update Artplayer option type imports and usage

This commit is contained in:
Harvey Zack committed 2024-05-27 18:30:06 +08:00
1 parent ab109a1acd
commit 8366b0673a
4 files changed
+20 -10

No files matched your search

@@ -251,13 +251,12 @@ art.current = new Artplayer();
### Option
you can also separately import the type for options
You can also use the option type
```ts{2,4}
```ts{3}
import Artplayer from 'artplayer';
import { type Option } from 'artplayer/types/option';
const option: Option = {
const option: Artplayer['Option'] = {
container: '.artplayer-app',
url: './assets/sample/video.mp4',
};
+3 -4
View File
@@ -254,13 +254,12 @@ art.current = new Artplayer();
### Option
你也可以单独导入选项的类型
你也可以使用选项的类型
```ts{2,4}
```ts{3}
import Artplayer from 'artplayer';
import { type Option } from 'artplayer/types/option';
const option: Option = {
const option: Artplayer['Option'] = {
container: '.artplayer-app',
url: './assets/sample/video.mp4',
};