Skip to content

Instantly share code, notes, and snippets.

@donamkhanh
Created July 2, 2018 14:43
Show Gist options
  • Save donamkhanh/44b843051b25078a6c7bcd307cb09901 to your computer and use it in GitHub Desktop.
Save donamkhanh/44b843051b25078a6c7bcd307cb09901 to your computer and use it in GitHub Desktop.
Fix bug show black video on Safari when using kurento-utils.js
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
if (isSafari) {
if (constraints.offerToReceiveAudio) {
pc.addTransceiver('audio');
}
if (constraints.offerToReceiveVideo) {
pc.addTransceiver('video');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment