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
El video html muestra una pantalla blanca cuando se agrega dinámicamente usando ajax

Usando jQuery, estoy enviando una solicitud AJAX que devolverá datos JSON con código HTML. El código html se agregará al cuerpo del documento. Esto es lo que estoy haciendo:

 $.get('get.php', { req: 'video_html' }, function (data) { if (data.responsetype === "SUCCESS") { $(document.body).append(data.video_html); } });

El código video_html es el siguiente:

 <video id="newVideo" src="http://.... .mp4" preload="yes"> Your browser does not support video playing. </video>

El video se agrega correctamente al cuerpo del documento, la URL (atributo src) también se vincula correctamente al video, pero en su lugar muestra una pantalla en blanco. ¿Alguien sabe por qué?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Agregué un tiempo de espera y funcionó:

 $.get('get.php', { req: 'video_html' }, function (data) { setTimeout(function(){ if (data.responsetype === "SUCCESS") { $(document.body).append(data.video_html); } }, 1000); });
about 4 years ago · Santiago Trujillo 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!