Firefox error handler when DS fails
This commit is contained in:
parent
56a8bc78d5
commit
a42c9765f7
@ -1085,6 +1085,7 @@
|
||||
// Commit: 05488dda5d9d1048e286b0bdee27515d217b15a5
|
||||
|
||||
var constraints = {};
|
||||
var errorCallback = null;
|
||||
if (window.firefoxDesksharePresent) {
|
||||
window.firefoxDesksharePresent = false;
|
||||
constraints = {
|
||||
@ -1100,12 +1101,18 @@
|
||||
video: video_constraints
|
||||
};
|
||||
}
|
||||
|
||||
n.getMedia(constraints,
|
||||
// ----------------------------------------------------------
|
||||
streaming, options.onerror ||
|
||||
// if a callback was added use it, otherwise use default error handler
|
||||
if (typeof window.firefoxDesksharePresentErrorCallback === "function") {
|
||||
errorCallback = window.firefoxDesksharePresentErrorCallback;
|
||||
} else {
|
||||
errorCallback = options.onerror ||
|
||||
function(e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
n.getMedia(constraints, streaming, function() {
|
||||
errorCallback({'status': 'Failed to getUserMedia on Firefox', 'errorcode': 2000});
|
||||
});
|
||||
|
||||
function streaming(stream) {
|
||||
|
Loading…
Reference in New Issue
Block a user