Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
Why does Vue3 need source element in the audio element?

can play mp3. Vue 2 version. but doesn't work with Vue3.

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

It needs to be done this way with Vue3.

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

Why do I need a source element?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

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>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!