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

489
Vistas
Twilio : How to grant access to camera once for all?

I have a meeting app using Twilio Video.

The app has a requirement such that when a user wants to join a room, it's not immediate. That means : A user sends a request to the app server to join, immediately he will see his local webcam, then he will wait for sometime until the server responds with a token to join the room. It may be 10 or 20 minutes.

The communication between the client and the server is done through WebSockets.

Here is the process :

Step 1: Client sends a request to the app server to join a room

Step 2: Request access and show the client local camera as follows :

// Get the track from twilio
const Track = await Twilio.Video.createLocalVideoTrack();

// Add track to HTML        
LocalMediaContainer.appendChild(Track.attach());

Step 3: Client waits for the server to respond (let's say 10 minutes)

Step 4: The server responds with the token to join Twilio video room

Step 5: Client joins room using the token sent by the server as follows

Twilio.Video.connect(Token, { name:RoomName }).then(room => {
    console.log('Successfully joined a Room');

    room.on('participantConnected', participant => {
      console.log('A remote Participant connected ');
    });
  }, error => {
    console.error('Unable to connect to Room');
  });

The process works fine. The problem I'm getting however, is that in Step 5, when the client is trying to join a room, twilio asks him again to grant access to camera.

Basically, even though the access has already been granted, the method Twilio.Video.connect asks again for access.

I was wondering if there is a way to use the authorization previously granted to use the camera and avoid asking for it again if it has already been granted.

Thanks Cheers,

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

0

Twilio developer evangelist here.

When you call Twilio.Video.connect you can pass an array of tracks with the user's media that you already have.

Twilio.Video.connect(Token, { name: RoomName, tracks: [VideoTrack, AudioTrack] }).then(...);

This uses your existing tracks instead of making a new permissions request to getUserMedia.

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