Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/docs/assets/css/style.css b/docs/assets/css/style.css index 71c36ad75..706218333 100644 --- a/docs/assets/css/style.css +++ b/docs/assets/css/style.css @@ -75,6 +75,7 @@ img { display: flex; justify-content: space-between; height: 100%; + line-height: 1; } .header .qq { @@ -265,3 +266,14 @@ img { background-position: center center; background-size: contain; } + +.fullscreenWeb { + position: fixed; + z-index: 9999; + width: 100%; + height: 100%; + left: 0; + top: 0; + right: 0; + bottom: 0; +} \ No newline at end of file diff --git a/docs/assets/example/iframe.js b/docs/assets/example/iframe.js new file mode 100644 index 000000000..912f5d487 --- /dev/null +++ b/docs/assets/example/iframe.js @@ -0,0 +1,43 @@ +const $iframe = document.createElement('iframe'); +$iframe.allowFullscreen = true; +$iframe.width = '100%'; +$iframe.height = '100%'; + +const $container = document.querySelector('.artplayer-app'); +$container.innerHTML = ''; +$container.appendChild($iframe); + +const iframe = new ArtplayerPluginIframe({ + iframe: $iframe, + url: '/iframe.html', +}); + +iframe.message(({ type, data }) => { + switch (type) { + case 'fullscreenWeb': + if (data) { + $iframe.classList.add('fullscreenWeb'); + } else { + $iframe.classList.remove('fullscreenWeb'); + } + break; + default: + break; + } +}); + +iframe.commit(() => { + var art = new Artplayer({ + container: '.artplayer-app', + url: '/assets/sample/video.mp4', + fullscreen: true, + fullscreenWeb: true, + }); + + art.on('fullscreenWeb', (state) => { + ArtplayerPluginIframe.postMessage({ + type: 'fullscreenWeb', + data: state, + }); + }); +}); diff --git a/docs/document/404.html b/docs/document/404.html index 9ab68ce14..d7614f27e 100644 --- a/docs/document/404.html +++ b/docs/document/404.html @@ -5,13 +5,13 @@
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.