mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 10:41:20 -08:00
feat(vue): [EX-02] verify installed consumers and preserve lifecycle contracts
This commit is contained in:
1 parent
4df9689364
commit
d62ab13a35
29 files changed
+2326
-82
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import type { Option } from 'artplayer'
|
||||
import artplayerPluginDanmuku from 'artplayer-plugin-danmuku'
|
||||
import artplayerPluginDocumentPip from 'artplayer-plugin-document-pip'
|
||||
import fr from 'artplayer/i18n/fr'
|
||||
import id from 'artplayer/i18n/id'
|
||||
|
||||
// Preserve this example's existing overrides and create plugins per instance.
|
||||
export function playerOptions(option: Partial<Option>, container: HTMLDivElement): Option {
|
||||
return {
|
||||
...option,
|
||||
container,
|
||||
// Partial<Option> is the historical wrapper API; Artplayer validates missing URLs.
|
||||
url: option.url as string,
|
||||
i18n: { id, fr },
|
||||
lang: 'fr',
|
||||
plugins: [
|
||||
artplayerPluginDocumentPip({}),
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: 'https://artplayer.org/assets/sample/danmuku.xml',
|
||||
}),
|
||||
],
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user