twilio-video.js icon indicating copy to clipboard operation
twilio-video.js copied to clipboard

Send empty audio/video packets to twilio server when local media track is unpubslished

Open DebjitPramanick opened this issue 2 years ago • 4 comments

I noticed that, when room participant mutes (unpublish) his/her local media track, no media signal is sent to server. So the audio/video output does not contain any silences for those parts. For an example:

If a recording session is of total 30 secs, and

  1. host's behaviour in the session -> 10s (Muted) + 15s (Unmuted) + 5s (Muted)
  2. participant's behaviour in the session -> 12s (Muted) + 10s (Unmuted) + 8s (Muted)

So for host recordings are of 15s and that for participant racordings are of 10s. Beginning and ending muted parts are not there. So can you please add feature which sends silent audio packets or empty video packets while muted?

Solution using ffmpeg takes much time, as we have to first download audio from twilio cloud storage and then modify it. Also getting the time difference and adding the silences seems complex. If the .mka /.mkv files include the muted parts, it will be great.

DebjitPramanick avatar Jun 02 '22 17:06 DebjitPramanick

Hi @DebjitPramanick thank you for reaching out. I'm not sure if this is pretty straightforward to implement but we will consider it. As a workaround, is disabling the tracks to mute (instead of unpublishing) work for your use case? That is, instead of publishing/unpublishing when unmuting/muting, you just try to enable/disable it.

charliesantos avatar Jun 07 '22 20:06 charliesantos

@charliesantos tried but does not solve the problem.

DebjitPramanick avatar Jun 09 '22 06:06 DebjitPramanick

@DebjitPramanick thanks for trying. As mentioned, this is a pretty complex feature and we will consider it.

charliesantos avatar Jun 13 '22 17:06 charliesantos

One of the Reasons for needing to do this is because of the lack of enable/disable capability on PSTN Participants. The Workaround from Twilio Video was to unsubscribe the tracks to mute the participants. We then run into this...

moretalk avatar Jul 09 '22 22:07 moretalk