Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show feedback when WebRTC is not supported by the browser #97

Merged
merged 4 commits into from
Nov 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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