Skip to content

Commit

Permalink
Merge pull request #97 from nextcloud/unsupported-error
Browse files Browse the repository at this point in the history
show feedback when WebRTC is not supported by the browser
  • Loading branch information
jancborchardt authored Nov 18, 2016
2 parents adb45e4 + 6d499d7 commit 79d4c6c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions js/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,15 +263,31 @@ var spreedMappingTable = [];
message = t('spreed', 'Access to microphone & camera was denied');
$('#emptycontent p').hide();
}
} else if(!OCA.SpreedMe.webrtc.capabilities.support) {
console.log('WebRTC not supported');

message = t('spreed', 'WebRTC is not supported in your browser :-/');
messageAdditional = t('spreed', 'Please use a different browser like Firefox or Chrome');
} else {
message = t('spreed', 'Error while accessing microphone & camera: {error}', {error: error.message || error.name});
$('#emptycontent p').hide();
message = t('spreed', 'Error while accessing microphone & camera');
messageAdditional = error.message || error.name;
}
$('#emptycontent .icon-video').removeClass('icon-video').addClass('icon-video-off');
$('#emptycontent h2').text(message);
$('#emptycontent p').text(messageAdditional);
});

if(!OCA.SpreedMe.webrtc.capabilities.support) {
console.log('WebRTC not supported');
var message, messageAdditional;

message = t('spreed', 'WebRTC is not supported in your browser :-/');
messageAdditional = t('spreed', 'Please use a different browser like Firefox or Chrome');

$('#emptycontent h2').text(message);
$('#emptycontent p').text(messageAdditional);
}

OCA.SpreedMe.webrtc.on('joinedRoom', function(name) {
$('#app-content').removeClass('icon-loading');
$('.videoView').removeClass('hidden');
Expand Down

0 comments on commit 79d4c6c

Please sign in to comment.