audio.js 473 B

123456789101112131415161718
  1. /*
  2. * @Author: LiZhiWei
  3. * @Date: 2025-05-14 15:22:27
  4. * @LastEditors: LiZhiWei
  5. * @LastEditTime: 2025-05-14 15:22:38
  6. * @Description:
  7. */
  8. export function createAudioElement (element) {
  9. const el = document.createElement('audio')
  10. el.src = element.blob
  11. el.controls = true
  12. el.style.height = element.height + 'px'
  13. el.style.position = 'absolute'
  14. el.style.top = element.top + 'px'
  15. el.style.left = element.left + 'px'
  16. el.style.zIndex = element.order
  17. return el
  18. }