mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-17 01:56:16 -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
@@ -257,6 +257,7 @@ function artplayerPluginDocumentPip(userOptions = {}) {
|
||||
};
|
||||
addClass($player, 'artplayer-document-pip');
|
||||
art.events.bindGlobalEvents?.();
|
||||
art.emit('resize');
|
||||
art.emit('document-pip', true);
|
||||
} catch (err) {
|
||||
art.notice.show = 'Document Picture-in-Picture open failed';
|
||||
@@ -281,6 +282,7 @@ function artplayerPluginDocumentPip(userOptions = {}) {
|
||||
state.win = null;
|
||||
removeClass($player, 'artplayer-document-pip');
|
||||
art.events.bindGlobalEvents?.();
|
||||
art.emit('resize');
|
||||
art.emit('document-pip', false);
|
||||
} catch (err) {
|
||||
art.notice.show = 'Document Picture-in-Picture close failed';
|
||||
|
||||
Reference in new issue
Block a user