mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-10 21:06:15 -08:00
fix(iframe): [PKG-IFRAME-05] checkpoint player and editor integration
This commit is contained in:
1 parent
047e2df945
commit
b35183c7af
15 files changed
+2547
-14
No files matched your search
@@ -15,6 +15,11 @@ const iframe = new ArtplayerToolIframe({
|
||||
url: '/iframe.html',
|
||||
})
|
||||
|
||||
window.addEventListener('artplayer:example:cleanup', () => {
|
||||
iframe.destroy()
|
||||
$iframe.remove()
|
||||
}, { once: true })
|
||||
|
||||
iframe.message(({ type, data }) => {
|
||||
switch (type) {
|
||||
case 'fullscreenWeb':
|
||||
@@ -44,4 +49,7 @@ iframe.commit(() => {
|
||||
data: state,
|
||||
})
|
||||
})
|
||||
}).catch((error) => {
|
||||
if (!iframe.destroyed)
|
||||
console.error(error)
|
||||
})
|
||||
Reference in new issue
Block a user