steep-balloon-41261
10/27/2022, 3:49 PMbest-parrot-43500
10/27/2022, 3:50 PMbest-parrot-43500
10/27/2022, 3:52 PMend listener to the track
• if the event is emitted while the track is published
• emit the mute event both locally and remotelybest-parrot-43500
10/28/2022, 6:21 AMpolite-kilobyte-67570
10/28/2022, 8:28 AMuserProvided boolean to false helps in your case? https://docs.livekit.io/client-sdk-js/classes/LocalVideoTrack.html#constructor
Regarding your observation between revoking permissions and calling track.stop() manually - that’s indeed interesting. Can you open an issue on github about it? As you said, we wouldn’t expect users to call the stop method manually in most cases, but it’s still quite surprising.best-parrot-43500
10/28/2022, 8:49 AMCan you open an issue on github about it?Will do
Have you tried if setting theWhen usingboolean to false helps in your case?userProvided
LocalParticipant.publishTrack() the userProvided flag is automatically set to true
I can set it to false when calling replaceTrack later for a test but generally I don't want to do this as this will try to access UserMedia later on.
From previous experience with users who would create tracks manually, we decided that the safe bet is to leave the mediastreamtrack lifecycle to the integrating user.I partially agree, however I do think it's correct to mute the track on the `end`event because there is no way this track will be valid again
polite-kilobyte-67570
10/28/2022, 9:10 AMI partially agree, however I do think it’s correct to mute the track on the `end`event because there is no way this track will be valid againyeah, that sounds reasonable. I’ll take a look whether changing it to additionally mute the track would potentially break things. For a workaround until then, you could listen to
ParticipantEvent.UpstreamPaused which will get emitted on ended also for user provided tracks.best-parrot-43500
10/28/2022, 9:16 AMlocalTrackPublication.isUpstreamPaused will go to true however if I manually stop the track it will stay false thanks for the event hint, I didn't see it right away as it's @internalpolite-kilobyte-67570
10/28/2022, 9:17 AMTrackEvent.Ended fired when you manually stop the track? or the ended event on the mediastreamtrack itself?best-parrot-43500
10/28/2022, 9:19 AMpolite-kilobyte-67570
10/28/2022, 9:20 AMImmediately after calling, thestop()property is set toreadyState. Note that theendedevent will not be fired in this situation.ended
best-parrot-43500
10/28/2022, 9:21 AMbest-parrot-43500
10/28/2022, 9:21 AMbest-parrot-43500
10/28/2022, 9:21 AMstop on a track that should be publishedbest-parrot-43500
10/28/2022, 9:25 AMended event fires and the provider of the track must make sure the track is not stopped manually as long as it should be actively streamed.best-parrot-43500
10/28/2022, 9:55 AM