electron/spec/fixtures/pages/fullscreen-oopif.html

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
549 B
HTML
Raw Normal View History

<script>
const { webFrame, ipcRenderer } = require('electron')
document.addEventListener('fullscreenchange', () => {
ipcRenderer.send('fullscreenChange', webFrame.routingId)
});
window.addEventListener('message', ({ data }) => {
if (data === 'exitFullscreen') {
document.exitFullscreen()
}
})
window.addEventListener('load', () => {
window.focus()
webFrame.executeJavaScript('document.querySelector("video").requestFullscreen()', true)
});
</script>
<video></video>