Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda