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

3.6K
Vistas
Clicking screen share pop up cancel button gives Unhandled Runtime Error

I'm implementing a video chat app with the OpenTokjs library with react using Next.js, when I tried to add the screen sharing feature before start sharing the screen the browser asks for permission and when the user click on the cancel button and refuse to give permission
it throws OT_USER_MEDIA_ACCESS_DENIED and even though I'm handling this error in the opentok callback error it still broke my Next.js App with Unhandled Runtime Error:

enter image description here

According to my research, this error is thrown by the browser because I tried it in Firefox and didn't face this issue here is similar issue reported here.

Here is the code:

publisherHelperRef.current = OT.initPublisher(
    publisherProperties,
    (error) => {
      if (error?.name === "OT_USER_MEDIA_ACCESS_DENIED") {
        setIsScreenShared(false)
        return  publishStream(getStreamSize())
      } 
      else if (error) {
        message.error(error?.name)
      }          
    }
)
    
sessionHelperRef.current?.publish(
    publisherHelperRef.current,
    (error) => {
      if (error) {
        message.error(error?.name)
      }    
    }
)   
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