mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
- 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.
22 lines
490 B
TypeScript
22 lines
490 B
TypeScript
interface Option {
|
|
width?: number
|
|
height?: number
|
|
placeholder?: string
|
|
fallbackToVideoPiP?: boolean
|
|
}
|
|
|
|
interface Result {
|
|
name: 'artplayerPluginDocumentPip'
|
|
isSupported: boolean
|
|
isActive: boolean
|
|
open: () => void
|
|
close: () => void
|
|
toggle: () => void
|
|
}
|
|
|
|
declare const artplayerPluginDocumentPip: (option: Option) => (art: Artplayer) => Result
|
|
|
|
export default artplayerPluginDocumentPip
|
|
|
|
export = artplayerPluginDocumentPip;
|
|
export as namespace artplayerPluginDocumentPip; |