[Vuejs]-Why does Vue3 need source element in the audio element?

0👍

You don’t need a source element, if you only provide a single media resources for the <audio> element.

<audio> and <source> are not Vue-specific elements.

The <source> HTML element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element (source)

<template>
  <audio
    controls
    src="../assets/file_example_MP3_700KB.mp3">
  </audio>
</template>

Leave a comment