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

131
Views
¿Cómo puedo obtener datos parciales de video cuando llamo a la API sin una barra de búsqueda de video?
 $.ajax({ type: 'GET', url: 'http://localhost:8080/api/file/play/559', xhrFields: { responseType: 'blob' }, beforeSend: (xhr) => { xhr.setRequestHeader('Range', 'bytes=' + 1200000 + '-') }, success: (data, status, xhr) => { let blobData = new Blob([data], {type: 'octet/stream'}) let el = document.querySelector('#jquery_jplayer_1 > video') const url = URL.createObjectURL(blobData) const htmlNewEl = url const htmlOldEl = el.currentSrc if (htmlOldEl && htmlOldEl.startsWith('blob:')) { el.src = '' URL.revokeObjectURL(htmlOldEl) } el.src = htmlNewEl el.load() } })

No creo que haya un encabezado de video.

Si intenta reproducir el video después de llamar a la API, se muestra un error como se muestra en la imagen a continuación.

 Uncaught (in Promise) DOMException: Failed to load because no supported source was found.

imagen_1 imagen_2

about 4 years ago · Juan Pablo Isaza
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!