mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 03:11:20 -08:00
Add resize event emission on document Picture-in-Picture open and close
- Emit 'resize' event after adding the document Picture-in-Picture class to the player. - Emit 'resize' event after removing the document Picture-in-Picture class from the player.
This commit is contained in:
1 parent
79358663eb
commit
9e73b0aec9
7 files changed
+9
-5
No files matched your search
@@ -116,6 +116,7 @@ export default function artplayerPluginDocumentPip(userOptions = {}) {
|
||||
|
||||
addClass($player, 'artplayer-document-pip')
|
||||
art.events.bindGlobalEvents?.()
|
||||
art.emit('resize')
|
||||
art.emit('document-pip', true)
|
||||
}
|
||||
catch (err) {
|
||||
@@ -145,6 +146,7 @@ export default function artplayerPluginDocumentPip(userOptions = {}) {
|
||||
state.win = null
|
||||
removeClass($player, 'artplayer-document-pip')
|
||||
art.events.bindGlobalEvents?.()
|
||||
art.emit('resize')
|
||||
art.emit('document-pip', false)
|
||||
}
|
||||
catch (err) {
|
||||
|
||||
Reference in new issue
Block a user