Use capabilities to detect feature

And allow Firefox to use screen sharing
master
Daniel Berteaud 10 years ago
parent 6415c2e9a6
commit ef08fa7b59
  1. 12
      public/js/vroom.js

@ -600,16 +600,16 @@ function initVroom(room) {
$('#name_local').css('background-color', peers.local.color);
// Screen sharing is only suported on chrome desktop > 26
if ( !$.browser.webkit || $.browser.android || $.browser.versionNumber < 26 ) {
$('#shareScreenLabel').remove();
}
// If browser doesn't support webRTC or dataChannels
if (!webrtc.capabilities.support || !webrtc.capabilities.supportDataChannel){
if (!webrtc.capabilities.support || !webrtc.capabilities.supportGetUserMedia || !webrtc.capabilities.supportDataChannel){
$('#noWebrtcSupport').modal('show');
}
// Hide screen sharing btn if not supported
if (!webrtc.capabilities.supportScreenSharing){
$('#shareScreenLabel').remove();
}
// Return the number of peers in the room
function countPeers(){
var count = Object.keys(peers).length;

Loading…
Cancel
Save