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

132
Vistas
How can I get video partial data when calling API without a video search bar?
        $.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()
            }
        })

I don't think there's a video header.

If you try to play the video after calling the API, an error as shown in the picture below is displayed.

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

image_1 image_2

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