UNPKG

@googleforcreators/media

Version:

Functionality for creating and working with media resources in the Web Stories editor.

3 lines (2 loc) 332 B
function e(e,r=.99){return e.currentTime===r?Promise.resolve():new Promise(((t,n)=>{e.addEventListener("seeking",(e=>{const r=setTimeout((()=>{clearTimeout(r),n(e)}),3e3)})),e.addEventListener("error",n),e.addEventListener("seeked",(()=>t()),{once:!0}),e.currentTime=r}))}export{e as default}; //# sourceMappingURL=seekVideo.js.map