Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140390

Twilio video fails in Chrome on Android and Safari on iOS, works on desktop

$
0
0

The support matrix seems to say it should be supported: Support Matrix Graphichttps://www.twilio.com/docs/video/javascript#supported-browsers

I can't find that it is NOT supported, but what works on my desktop is not working on any of 3 mobile devices.

I'm using the JS quickstart for video that has the code located here https://github.com/twilio/video-quickstart-js . The rest of the app works, but trying to preview the video gives a failure on all the mobile platforms.

The example at https://mdn-samples.mozilla.org/s/webrtc-capturestill/ works as expected in Chrome on Android and Safari on iOS, so this looks like it has to be a Twilio bug.

The error is "Unable to access Camera and Microphone" which is coming from here:

// Preview LocalParticipant's Tracks.
document.getElementById('button-preview').onclick = function() {
  var localTracksPromise = previewTracks
    ? Promise.resolve(previewTracks)
    : Video.createLocalTracks();

  localTracksPromise.then(function(tracks) {
    window.previewTracks = previewTracks = tracks;
    var previewContainer = document.getElementById('local-media');
    if (!previewContainer.querySelector('video')) {
      attachTracks(tracks, previewContainer);
    }
  }, function(error) {
    console.error('Unable to access local media', error);
    log('Unable to access Camera and Microphone');
  });
};

Viewing all articles
Browse latest Browse all 140390

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>