League-of-Foundry-Developers / fvtt-module-furnace

34 stars 12 forks source link

Add PiP macro #85

Closed kakaroto closed 3 years ago

kakaroto commented 3 years ago

Cause it's just so cool and I keep forgetting the command

const v = $(`<video id='pip-video' autoplay='autoplay' onplay='this.requestPictureInPicture()'></video>`)[0];  v.srcObject = $("#board")[0].captureStream(); const w = () => {if (v.readyState < 2) setTimeout(w, 0); else v.play(); };  w()