feat: add danmuku plugin documentation and i18n setup guide

- Created a new documentation file for the danmuku plugin with code examples.
- Added a comprehensive guide for language settings (i18n) including default languages, importing languages, adding new languages, and modifying existing languages.
- Included code snippets for initializing the Artplayer with different language settings.

feat: implement safe area insets for improved video rotation handling

feat: add console log for safe area insets in autoOrientation plugin

feat: enhance mobile meta tags for better web app support
This commit is contained in:
Harvey Zhao committed 2026-04-01 12:24:38 +08:00
1 parent 4501ec2907
commit 6aa6f9ad53
53 files changed
+163 -84

No files matched your search

+16
View File
@@ -180,3 +180,19 @@ export function getComposedPath(event) {
}
return path
}
export function getSafeAreaInsets() {
const div = document.createElement('div')
div.style.cssText
= 'position:fixed;top:env(safe-area-inset-top,0px);right:env(safe-area-inset-right,0px);bottom:env(safe-area-inset-bottom,0px);left:env(safe-area-inset-left,0px);pointer-events:none;visibility:hidden;'
document.body.appendChild(div)
const style = getComputedStyle(div)
const insets = {
top: Number.parseFloat(style.top) || 0,
right: Number.parseFloat(style.right) || 0,
bottom: Number.parseFloat(style.bottom) || 0,
left: Number.parseFloat(style.left) || 0,
}
div.remove()
return insets
}