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

300
Vistas
video.play() occurred unhandled rejection (notallowederror) on IOS

using peer.js for stream video on React APP

  addVideoStream(video: HTMLVideoElement, stream: MediaStream) {
    video.srcObject = stream

    video?.addEventListener('loadedmetadata', () => {
      video.play()
    })
    if (this.videoGrid) this.videoGrid.append(video)
  }

got this error at 'video.play()'

the request is not allowed by the user agent or the platform in the current context

already I allowed permission for Audio and video on IOS.

this code works well other platforms except IOS.

I have no idea.

If I deploy then I just get black screen on IOS.

how can I fix this?

thanks in advance

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

the problem was how video tag works in IOS with WebRTC.

used HTTPS environment(production) then add these attributes

if (isMobile && isSafari) {
      this.myVideo.playsInline = true
      this.myVideo.autoplay = true
    }

then it works.

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