airi / assets /audio-jAc348TC.js
nekomeowww's picture
release: build f5fd13497ca7280ae10984c958be684eb4f53e20
260cd65
raw
history blame
513 Bytes
import{bA as e,bN as t,bQ as n,bV as r,by as i}from"./index-ts3Xuos_.js";var a=t({__name:`audio`,setup(t){let a=r(),o=r();function s(e){if(!e)return;let t=o.value?.files?.[0];if(!t)return;let n=document.createElement(`audio`);a.value?.appendChild(n),n.src=URL.createObjectURL(t),n.controls=!0,n.load(),n.play()}return(t,r)=>(i(),n(`div`,null,[e(`div`,null,[e(`div`,{ref_key:`containerRef`,ref:a},null,512),e(`input`,{ref_key:`fileInputRef`,ref:o,type:`file`,onChange:s},null,544)])]))}}),o=a;export{o as default};