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

240
Vistas
HTML5 Video in ajax call

I want to call a video in ajax query, it work but not corectly (It lacks the control buttons of the video player)
Here is my ajax code:

$.ajax({
    context: document.body,
    url: "/?get=json&act=video", 
    type: "get", 
    success: function(html) {  
          // console.log(JSON.parse(html)); 
          var a = JSON.parse(html);
          var returnVideo = "";
          a.forEach(function(element) {
          console.log(element);

            returnVideo += '    <div class="uk-card uk-card-hover uk-card-default">';   
            returnVideo += '        <div class="uk-card-media-top">'; 
            returnVideo += '    <video  width="" height="">';   
            returnVideo += '        <source src="'+element.gameClipUris[0].uri+'" type="video/mp4">';   
            returnVideo += '    </video>';  
            returnVideo += '        </div>';    
            returnVideo += '    </div><br />';  

          });
          $('#loading').hide("slow");
          $('#retourForm').append(returnVideo);
        }
});

The output: enter image description here

It lacks the control buttons of the video player!
I have test to add player with url hardcoded and it work (right in image)...

enter image description here

So I guess I can not load html5 player from javascript?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can add controls attribute to the video tag like <video controls></video>. For more info read about video tag.

about 4 years ago · Santiago Trujillo 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