mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin with code examples. - Added comprehensive language settings documentation, including default languages, import instructions, and examples for adding and modifying languages. - Updated the i18n documentation to reflect changes in language handling and provide clear examples for users.
This commit is contained in:
1 parent
c88aa97c0a
commit
c655f073ae
60 files changed
+85
-2496
No files matched your search
@@ -1,44 +0,0 @@
|
||||
// npm i artplayer-plugin-libass
|
||||
// import artplayerPluginLibass from 'artplayer-plugin-libass';
|
||||
|
||||
const art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
fullscreenWeb: true,
|
||||
subtitle: {
|
||||
url: '/assets/sample/style-test.ass',
|
||||
},
|
||||
plugins: [
|
||||
artplayerPluginLibass({
|
||||
// debug: true,
|
||||
workerUrl: 'https://unpkg.com/libass-wasm@4.1.0/dist/js/subtitles-octopus-worker.js',
|
||||
// wasmUrl: 'https://unpkg.com/libass-wasm@4.1.0/dist/js/subtitles-octopus-worker.wasm',
|
||||
fallbackFont: '/assets/misc/SourceHanSansCN-Bold.woff2',
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
// init
|
||||
art.on('artplayerPluginLibass:init', (adapter) => {
|
||||
console.info('artplayerPluginLibass:init', adapter)
|
||||
})
|
||||
|
||||
// subtitle switch
|
||||
art.on('artplayerPluginLibass:switch', (url) => {
|
||||
console.info('artplayerPluginLibass:switch', url)
|
||||
})
|
||||
|
||||
// subtitle visible
|
||||
art.on('artplayerPluginLibass:visible', (visible) => {
|
||||
console.info('artplayerPluginLibass:visible', visible)
|
||||
})
|
||||
|
||||
// subtitle timeOffset
|
||||
art.on('artplayerPluginLibass:timeOffset', (timeOffset) => {
|
||||
console.info('artplayerPluginLibass:timeOffset', timeOffset)
|
||||
})
|
||||
|
||||
// destroy
|
||||
art.on('artplayerPluginLibass:destroy', () => {
|
||||
console.info('artplayerPluginLibass:destroy')
|
||||
})
|
||||
Reference in new issue
Block a user