github twilio/twilio-video.js 2.6.0

2.6.0 (June 26, 2020)

Changes

  • Worked around this iOS Safari bug which causes your
    application to lose the microphone when another application (Siri, YouTube, FaceTime, etc.) reserves the
    microphone. Now your application will regain the microphone after foregrounding. As a result of this, the
    LocalAudioTrack's mediaStreamTrack property will now point to the newly acquired MediaStreamTrack, and
    the started event is fired again on the LocalAudioTrack. The id of the LocalAudioTrack is now no longer
    guaranteed to be equal to the id of the MediaStreamTrack. Also, if you want to listen to events on the
    MediaStreamTrack, we recommend that you do so in the started event handler, since it guarantees that you
    are always listening to events on the most recently acquired MediaStreamTrack. (JSDK-2828)
const { createLocalAudioTrack } = require('twilio-video');

const localAudioTrack = await createLocalAudioTrack();

function onMute() {
  console.log('MediaStreamTrack muted!');
}

function onUnmute() {
  console.log('MediaStreamTrack unmuted!');
}

localAudioTrack.on('started', () => {
  const { mediaStreamTrack } = localAudioTrack;
  mediaStreamTrack.addEventListener('mute', onMute);
  mediaStreamTrack.addEventListener('unmute', onUnmute);
});

localAudioTrack.on('stopped', () => {
  const { mediaStreamTrack } = localAudioTrack;
  mediaStreamTrack.removeEventListener('mute', onMute);
  mediaStreamTrack.removeEventListener('unmute', onUnmute);
});
  • Worked around iOS Safari bug where, when the application is foregrounded,
    it sometimes does not resume playback of the HTMLMediaElements attached to RemoteTracks that are paused when the application
    was backgrounded (JSDK-2879).
latest releases: 2.13.0-rc5, 2.13.0-rc4, 2.13.0-rc3...
8 months ago