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

166
Views
How do I get the '<source>' of a video in JavaScript?

So, I'm having a problem where I want to get the video source, but it's shown as:

<video id="vid" controls>
  <source src="mov_bbb.mp4">
</video>

another problem is the <source> tag has no id, so how can I get the source of the <source> tag in the <video> tag?

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

0

Query for the source element inside that specific video element and get it's src

console.log(document.querySelector('#vid source').src)
<video id="vid" controls>
  <source src="mov_bbb.mp4">
</video>

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!