Closed Roshan931 closed 6 years ago
Hi, I believe the issue is that createLocalTracks
returns a Promise, so you need to await
or call then
on the Promise in order to get the tracks
out.
Hi @markandrus. Sorry, I forgot to add the await when I created the issue. I am awaiting it in my code. I updated the comment.
Please share the full logs from the page so we can identify where each LocalAudioTack/LocalVideoTrack is created and then where each is stopped. Please also pass logLevel: 'debug'
in both connect
and createLocalTracks
. Can you also
createLocalTracks
where you mentioned?connect
where you mentioned?getUserMedia
?this
?this.tracks
and losing references to LocalVideoTracks?LocalVideoTrack#stop and LocalAudioTrack#stop just delegate to the underlying MediaStreamTrack's stop
. It's equivalent to doing
localTrack.mediaStreamTrack.stop()
So if you call stop
and isStopped
returns true
, you can be sure those MediaStreamTracks are stopped (another way to check: mediaStreamTrack.readyState === 'ended'
). However, so long as one video MediaStreamTrack on the page is not ended, the camera light will remain on.
While reading your comment and going through the logs I realized that I need to stop the tracks on one more place. I have a screen where I preview the local tracks before going into the call screen. So the createLocalTracks
promise was called twice and the first time before switching the screen the tracks were not stopped.
I stopped the first tracks and now it is working. I thought that if I route to another angular component, the previous will destroy and the tracks will be stopped automatically. However, thank you very much for your help.
Ah, that’s great! Glad you got it fixed :-)
Hi, I am facing this issue again in Safari. Chrome its working fine. any help will be much appreciated @markandrus @manjeshbhargav Safari - 12.1.2 (14607.3.9)
[Info] 2020-06-10 – "15:33:27.453Z" – "|" – "INFO" – "in" – "[connect #2]:" – "Connecting to a Room" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:27.453Z" – "|" – "DEBUG" – "in" – "[connect #2]:" – "Options:" – {wsServer: "wss://global.vss.twilio.com/signaling", abortOnIceServersTimeout: false, automaticSubscription: true, …} (twilio-video.min.js, line 51)
{wsServer: "wss://global.vss.twilio.com/signaling", abortOnIceServersTimeout: false, automaticSubscription: true, createLocalTracks: function, dominantSpeaker: true, …}Object
[Info] 2020-06-10 – "15:33:27.454Z" – "|" – "INFO" – "in" – "[NTSIceServerSource #2]:" – "Created a new NTSIceServerSource" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:27.454Z" – "|" – "DEBUG" – "in" – "[NTSIceServerSource #2]:" – "ECS server:" – "https://ecs.us1.twilio.com" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:27.455Z" – "|" – "INFO" – "in" – "[connect #2]:" – "LocalTracks were not provided, so they will be acquired automatically before connecting to the Room. LocalTracks will be released i…" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:27.455Z" – "|" – "INFO" – "in" – "[createLocalTracks #3]:" – "Neither audio nor video requested, so returning empty LocalTracks" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:27.455Z" – "|" – "DEBUG" – "in" – "[connect #2]:" – "Creating a new LocalParticipant:" – LocalParticipantV2 {_events: Object, _maxListeners: undefined, _reachableStates: Map, …} (twilio-video.min.js, line 51)
LocalParticipantV2 {_events: Object, _maxListeners: undefined, _reachableStates: Map, …}LocalParticipantV2
[Info] 2020-06-10 – "15:33:27.456Z" – "|" – "INFO" – "in" – "[LocalParticipant #2]:" – "Created a new Participant" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:27.456Z" – "|" – "INFO" – "in" – "[connect #2]:" – "Getting ICE servers" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:27.456Z" – "|" – "DEBUG" – "in" – "[connect #2]:" – "Options:" – {wsServer: "wss://global.vss.twilio.com/signaling", abortOnIceServersTimeout: false, automaticSubscription: true, …} (twilio-video.min.js, line 51)
{wsServer: "wss://global.vss.twilio.com/signaling", abortOnIceServersTimeout: false, automaticSubscription: true, createLocalTracks: function, dominantSpeaker: true, …}Object
[Info] 2020-06-10 – "15:33:27.457Z" – "|" – "INFO" – "in" – "[NTSIceServerSource #2]:" – "Starting" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:27.457Z" – "|" – "DEBUG" – "in" – "[NTSIceServerSource #2]:" – "Getting ECS configuration" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:29.093Z" – "|" – "INFO" – "in" – "[NTSIceServerSource #2]:" – "Got ICE servers: [{\"urls\":\"turn:global.turn.twilio.com:3478?transport=udp\",\"username\":\"94974a5a14728b496fcf0d431c1f63317e6085a1d1af0ffb67931…" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:29.094Z" – "|" – "INFO" – "in" – "[NTSIceServerSource #2]:" – "Getting ICE servers again in 14400 seconds" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:29.094Z" – "|" – "INFO" – "in" – "[connect #2]:" – "Got ICE servers" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:29.094Z" – "|" – "DEBUG" – "in" – "[connect #2]:" – "ICE servers:" – [{urls: "turn:global.turn.twilio.com:3478?transport=udp", username: "94974a5a14728b496fcf0d431c1f63317e6085a1d1af0ffb67931e64379f4ea2", credential: "IBr5x05HIsqFKaLSlmjQmChDWYAExI92JKgT3OY0rB8="}, {urls: "turns:global.turn.twilio.com:443?transport=tcp", username: "94974a5a14728b496fcf0d431c1f63317e6085a1d1af0ffb67931e64379f4ea2", credential: "IBr5x05HIsqFKaLSlmjQmChDWYAExI92JKgT3OY0rB8="}] (2) (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:29.094Z" – "|" – "DEBUG" – "in" – "[connect #2]:" – "Creating a new RoomSignaling" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:29.094Z" – "|" – "DEBUG" – "in" – "[connect #2]:" – "RoomSignaling params:" – {token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6InR3aW…zIifQ.40s3tTlI1LQkD9ixBezMz_e5Qs2__qSQZ0U2R90r2rw"} (twilio-video.min.js, line 51)
{token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6InR3aW…zIifQ.40s3tTlI1LQkD9ixBezMz_e5Qs2__qSQZ0U2R90r2rw"}Object
[Log] 2020-06-10 – "15:33:29.119Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Created a new WebSocket:" – WebSocket {URL: "wss://global.vss.twilio.com/signaling", url: "wss://global.vss.twilio.com/signaling", readyState: 0, …} (twilio-video.min.js, line 51)
WebSocket {URL: "wss://global.vss.twilio.com/signaling", url: "wss://global.vss.twilio.com/signaling", readyState: 0, bufferedAmount: 0, onopen: null, …}WebSocket
[Log] 2020-06-10 – "15:33:29.346Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "WebSocket opened:" – WebSocket {URL: "wss://global.vss.twilio.com/signaling", url: "wss://global.vss.twilio.com/signaling", readyState: 1, …} (twilio-video.min.js, line 51)
WebSocket {URL: "wss://global.vss.twilio.com/signaling", url: "wss://global.vss.twilio.com/signaling", readyState: 1, bufferedAmount: 0, onopen: null, …}WebSocket
[Log] 2020-06-10 – "15:33:29.347Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"id\":\"976a6bd4-f6c2-4868-b21f-fb721ff280b6\",\"timeout\":5000,\"type\":\"hello\"}" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:29.400Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"negotiatedTimeout\":5000,\"type\":\"welcome\"}" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:29.401Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"name\":\"5edfa4e2213e3f68c15af2e4\",\"participant\":{\"revision\":1,\"tracks\":[]},\"peer_connections\":[{\"description\":{\"type\":\"of…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.948Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"connected\",\"peer_connections\":[{\"id\":\"b8cc86b2-cfd1-4db2-887c-059519452b6e\",\"description\":{\"type\":\"an…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.948Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "Updated ICE reconnection timeout period:" – 30000 (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.949Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Transitioned to state:" – "connected" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.949Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Transitioned to state:" – "connected" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:30.949Z" – "|" – "INFO" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "reconnected" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.952Z" – "|" – "DEBUG" – "in" – "[Room #2: RMd4631a1efb134f09fa1dcac0353472aa]:" – "Creating a new RemoteParticipant for each ParticipantSignaling in the RoomSignaling" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.952Z" – "|" – "DEBUG" – "in" – "[Room #2: RMd4631a1efb134f09fa1dcac0353472aa]:" – "Setting up RemoteParticipant creation for all subsequent ParticipantSignalings that connect to the RoomSignaling" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:30.952Z" – "|" – "INFO" – "in" – "[Room #2: RMd4631a1efb134f09fa1dcac0353472aa]:" – "Created a new Room:" – "5edfa4e2213e3f68c15af2e4" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.952Z" – "|" – "DEBUG" – "in" – "[Room #2: RMd4631a1efb134f09fa1dcac0353472aa]:" – "Initial RemoteParticipants:" – [] (0) (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.952Z" – "|" – "DEBUG" – "in" – "[connect #2]:" – "Creating a new Room:" – Room {_events: {}, _maxListeners: undefined, _log: Log, …} (twilio-video.min.js, line 51)
Room {_events: {}, _maxListeners: undefined, _log: Log, _instanceId: 2, _options: Object, …}Room
[Info] 2020-06-10 – "15:33:30.953Z" – "|" – "INFO" – "in" – "[connect #2]:" – "Connected to Room:" – "[Room #2: RMd4631a1efb134f09fa1dcac0353472aa]" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:30.953Z" – "|" – "INFO" – "in" – "[connect #2]:" – "Room name:" – "5edfa4e2213e3f68c15af2e4" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.953Z" – "|" – "DEBUG" – "in" – "[connect #2]:" – "Room:" – Room {_events: {}, _maxListeners: undefined, _log: Log, …} (twilio-video.min.js, line 51)
Room {_events: {}, _maxListeners: undefined, _log: Log, _instanceId: 2, _options: Object, …}Room
[Log] onRoomJoined (main.chunk.js, line 126790)
[Log] 2020-06-10 – "15:33:30.960Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"sid\":\"RMd4631a1efb134f09fa1dcac0353472aa\",\"name\":\"5edfa4e2213e3f68c15af2e4\",\"participant\":{\"…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.961Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "ICE gathering state is \"gathering\"" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.961Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "Starting ICE gathering timeout: 15000" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.962Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "ICE connection state is \"checking\"" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:30.980Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "Clearing ICE gathering timeout" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:31.001Z" – "|" – "INFO" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Added a new AudioTrack:" – "e05da9fb-7c52-4d8a-a8a4-e27ae448da1c" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.001Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "AudioTrack:" – LocalAudioTrack {_events: Object, _maxListeners: undefined, _instanceId: 3, …} (twilio-video.min.js, line 51)
LocalAudioTrack {_events: Object, _maxListeners: undefined, _instanceId: 3, _log: Log, kind: "audio", …}LocalAudioTrack
[Info] 2020-06-10 – "15:33:31.002Z" – "|" – "INFO" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Added a new LocalAudioTrack:" – "e05da9fb-7c52-4d8a-a8a4-e27ae448da1c" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.002Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "LocalAudioTrack:" – LocalAudioTrack {_events: Object, _maxListeners: undefined, _instanceId: 3, …} (twilio-video.min.js, line 51)
LocalAudioTrack {_events: Object, _maxListeners: undefined, _instanceId: 3, _log: Log, kind: "audio", …}LocalAudioTrack
[Info] 2020-06-10 – "15:33:31.003Z" – "|" – "INFO" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Added a new VideoTrack:" – "d7ca4d56-d86c-4fe2-848e-bc4feff3e726" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.003Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "VideoTrack:" – LocalVideoTrack {_events: Object, _maxListeners: undefined, _instanceId: 4, …} (twilio-video.min.js, line 51)
LocalVideoTrack {_events: Object, _maxListeners: undefined, _instanceId: 4, _log: Log, kind: "video", …}LocalVideoTrack
[Info] 2020-06-10 – "15:33:31.003Z" – "|" – "INFO" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Added a new LocalVideoTrack:" – "d7ca4d56-d86c-4fe2-848e-bc4feff3e726" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.003Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "LocalVideoTrack:" – LocalVideoTrack {_events: Object, _maxListeners: undefined, _instanceId: 4, …} (twilio-video.min.js, line 51)
LocalVideoTrack {_events: Object, _maxListeners: undefined, _instanceId: 4, _log: Log, kind: "video", …}LocalVideoTrack
[Log] 2020-06-10 – "15:33:31.007Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"db59332a3b6cce6030607fd063b1f0c2d4631a1efb134f09fa1dcac0353472aa84ab61ab4d8f293c3fe4d7206cbe64685eaf3754767964…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.012Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"db59332a3b6cce6030607fd063b1f0c2d4631a1efb134f09fa1dcac0353472aa84ab61ab4d8f293c3fe4d7206cbe64685eaf3754767964…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.052Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "Clearing ICE gathering timeout" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.054Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"db59332a3b6cce6030607fd063b1f0c2d4631a1efb134f09fa1dcac0353472aa84ab61ab4d8f293c3fe4d7206cbe64685eaf3754767964…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.054Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "ICE gathering state is \"complete\"" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.125Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"peer_connections\":[{\"id\":\"b8cc86b2-cfd1-4db2-887c-059519452b6e\",\"description\":{\"type\":\"offer…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.126Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "Glare detected; rolling back" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.132Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"db59332a3b6cce6030607fd063b1f0c2d4631a1efb134f09fa1dcac0353472aa84ab61ab4d8f293c3fe4d7206cbe64685eaf3754767964…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.136Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"db59332a3b6cce6030607fd063b1f0c2d4631a1efb134f09fa1dcac0353472aa84ab61ab4d8f293c3fe4d7206cbe64685eaf3754767964…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.785Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"sid\":\"RMd4631a1efb134f09fa1dcac0353472aa\",\"name\":\"5edfa4e2213e3f68c15af2e4\",\"participant\":{\"…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.843Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "ICE connection state is \"connected\"" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.844Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "ICE connection state is \"completed\"" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.931Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"peer_connections\":[{\"id\":\"b8cc86b2-cfd1-4db2-887c-059519452b6e\",\"description\":{\"type\":\"answe…" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:31.932Z" – "|" – "INFO" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Added a new AudioTrackPublication:" – "MT7c712bac973d4ac6480fd6abf9f7dab8" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.932Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "AudioTrackPublication:" – LocalAudioTrackPublication {_events: {}, _maxListeners: undefined, _instanceId: 2, …} (twilio-video.min.js, line 51)
LocalAudioTrackPublication {_events: {}, _maxListeners: undefined, _instanceId: 2, _log: Log, trackName: "e05da9fb-7c52-4d8a-a8a4-e27ae448da1c", …}LocalAudioTrackPublication
[Info] 2020-06-10 – "15:33:31.932Z" – "|" – "INFO" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Added a new VideoTrackPublication:" – "MTd5abe2bf0bddce91a40e6cd7b3160f49" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:31.933Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "VideoTrackPublication:" – LocalVideoTrackPublication {_events: {}, _maxListeners: undefined, _instanceId: 3, …} (twilio-video.min.js, line 51)
LocalVideoTrackPublication {_events: {}, _maxListeners: undefined, _instanceId: 3, _log: Log, trackName: "d7ca4d56-d86c-4fe2-848e-bc4feff3e726", …}LocalVideoTrackPublication
[Log] 2020-06-10 – "15:33:33.953Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:34.400Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:35.940Z" – "|" – "INFO" – "in" – "[Room #2: RMd4631a1efb134f09fa1dcac0353472aa]:" – "Disconnecting" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.941Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Transitioned to state:" – "disconnected" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.941Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Removing Track event reemitters" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.941Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Transitioned to state:" – "disconnected" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.941Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "Removing LocalTrack event listeners" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:35.941Z" – "|" – "INFO" – "in" – "[LocalParticipant #2: PA84ab61ab4d8f293c3fe4d7206cbe6468]:" – "LocalParticipant disconnected. Stopping 0 automatically-acquired LocalTracks" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:35.942Z" – "|" – "INFO" – "in" – "[Room #2: RMd4631a1efb134f09fa1dcac0353472aa]:" – "Transitioned to state:" – "disconnected" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:35.942Z" – "|" – "INFO" – "in" – "[connect #2]:" – "Disconnected from Room:" – "[Room #2: RMd4631a1efb134f09fa1dcac0353472aa]" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.942Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"db59332a3b6cce6030607fd063b1f0c2d4631a1efb134f09fa1dcac0353472aa84ab61ab4d8f293c3fe4d7206cbe64685eaf3754767964…" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.942Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"bye\"}" (twilio-video.min.js, line 51)
[Info] 2020-06-10 – "15:33:35.943Z" – "|" – "INFO" – "in" – "[NTSIceServerSource #2]:" – "Stopping" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.943Z" – "|" – "DEBUG" – "in" – "[NTSIceServerSource #2]:" – "Stopped" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.964Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #2: b8cc86b2-cfd1-4db2-887c-059519452b6e]:" – "ICE connection state is \"closed\"" (twilio-video.min.js, line 51)
[Log] 2020-06-10 – "15:33:35.995Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #2: wss://global.vss.twilio.com/signaling]:" – "Closed" (twilio-video.min.js, line 51)
Code to reproduce the issue:
Connecting to Twilio and displaying the local and remote tracks works perfectly. However, when I try to turn off the camera or to completely disconnect from the room, the camera light is still on and the permission for camera is still allowed.
Everything works fine in the quickstart project and I am using the same code from there. I don't know if it has to do something with the Angular environment.
Expected behavior:
Remove the preview of local tracks and turn off camera when disabling video or when the room is disconnected.
Actual behavior:
Removes the preview but the camera light is still on.
Logs
The logs clearly show that the LocalVideoTrack is being disabled and ended. I also looked into the LocalVideoTrack object after it is being stopped and it returns true for isStopped and false for isEnabled.
Software versions: