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

217
Vistas
Twilio DataTrack API stop?

So I'm creating a simple zoom clone app and got an issue with the DataTrack API.

Initialized DataTrack

this.dataTrack = new LocalDataTrack();

The issue is that after leaving/disconnecting in the room the record Icon in the browser is still there.

LeaveRoom func

this.room.localParticipant.videoTracks.forEach((publication) => {
   publication.track.stop();
   publication.unpublish();
});

console.log("this.dataTrack", this.dataTrack); // HOW TO STOP THIS ?
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

The LocalDataTrack object has an id property.

You can get the MediaStreamTrack by looking up the media stream tracks from the media streams.

const userMedia = navigator.mediaDevices.getUserMedia({video:true, audio:true});

const tracks = userMedia.then(mediaStreams => {
     const tracks = mediaStreams.getTracks();
     for(let track of tracks) {
         if(track.id === this.dataTrack.id) {
              track.stop();
         }
     }
});
about 4 years ago · Juan Pablo Isaza Denunciar

0

These are the 3 I do. Works like a charm.

//Remove chromes "your browser is using the camera" icon
track.forEach((track) => track.stop())
room.localParticipant.unpublishTracks(track)
track.forEach((track) => track.detach())
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