mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
refactor: improve document Picture-in-Picture support checks and update type definitions
- Renamed variable `dpipOK` to `isSupported` for clarity in checking Document Picture-in-Picture support. - Updated the `open` function to use the new `isSupported` variable. - Removed redundant checks in the `close` function related to Document Picture-in-Picture support. - Added `isSupported` and `isActive` properties to the plugin's result interface in TypeScript definitions. - Cleaned up the code for better readability and maintainability.
This commit is contained in:
1 parent
a7d77f4f70
commit
657dd7e77c
13 files changed
+25
-38
No files matched your search
+2
-7
@@ -7,16 +7,11 @@ interface Option {
|
||||
|
||||
interface Result {
|
||||
name: 'artplayerPluginDocumentPip'
|
||||
isSupported: boolean
|
||||
isActive: boolean
|
||||
open: () => void
|
||||
close: () => void
|
||||
toggle: () => void
|
||||
state: {
|
||||
win: Window | null
|
||||
originalParent: Element | null
|
||||
originalNext: Element | null
|
||||
currentDoc: Document | null
|
||||
placeholder: Element | null
|
||||
}
|
||||
}
|
||||
|
||||
declare const artplayerPluginDocumentPip: (option: Option) => (art: Artplayer) => Result
|
||||
|
||||
Reference in new issue
Block a user