"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[9744],{9744(e,t,s){s.d(t,{ExportVideoPluginInstance:()=>r});var o=s(3199);const p=["webm","ogg","mp4","x-matroska"],a=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class r{#e;#t=[];constructor(e){this.#e=e,this.#t=function(){const e=e=>MediaRecorder.isTypeSupported(e),t=[];return p.forEach(s=>{const o=`video/${s}`;a.forEach(s=>{[`${o};codecs=${s}`,`${o};codecs=${s.toUpperCase()}`].forEach(s=>{e(s)&&t.push(s)})}),e(o)&&t.push(o)}),t}()}async export(e,t){const s={supported:!1};return"video"===e&&(s.supported=!0,s.blob=await this.#s(t)),s}async#s(e){const t=this.#e.canvas.domElement;if(t)return new Promise(s=>{const p=t.captureStream(e.fps??this.#e.actualOptions.fpsLimit),a=e.mimeType??this.#t[0],r=new MediaRecorder(p,{mimeType:a}),i=[];r.addEventListener("dataavailable",e=>{i.push(e.data)}),r.addEventListener("stop",()=>{s(new Blob(i,{type:a}))}),r.start(),setTimeout(()=>{r.stop()},e.duration??5*o.XuV)})}}}}]);