Skip to content
Snippets Groups Projects
Commit 6341a138 authored by Simon Döring's avatar Simon Döring
Browse files

Fix error output of noVNC camera-receiver.js

parent 859c8d35
Branches
No related tags found
No related merge requests found
......@@ -54,15 +54,17 @@ document.addEventListener('DOMContentLoaded', function() {
}
},
error: function(error) {
Janus.error('Error attaching plugin: ', error);
alert(error);
var formattedError = JSON.stringify(error, null, 2);
Janus.error('Error attaching plugin: ', formattedError);
alert(formattedError);
},
onmessage: handleMessagePublisher
});
},
error: function(error) {
Janus.error(error);
alert('Janus error: ' + error);
var formattedError = JSON.stringify(error, null, 2);
Janus.error(formattedError);
alert('Janus error: ' + formattedError);
},
destroyed: function() {
alert('Janus stopped');
......@@ -122,8 +124,9 @@ document.addEventListener('DOMContentLoaded', function() {
remoteFeedHandle.send({ message: listen });
},
error: function(error) {
Janus.error('Error attaching plugin (subscriber): ', error);
alert(error);
var formattedError = JSON.stringify(error, null, 2);
Janus.error('Error attaching plugin (subscriber): ', formattedError);
alert(formattedError);
},
onmessage: handleMessageListener,
onremotestream: function(stream) {
......@@ -165,8 +168,9 @@ document.addEventListener('DOMContentLoaded', function() {
remoteFeedHandle.send({ message: body, jsep });
},
error: function(error) {
Janus.error('WebRTC error:', error);
alert('WebRTC error: ', error.message);
var formattedError = JSON.stringify(error, null, 2);
Janus.error('WebRTC error:', formattedError);
alert('WebRTC error: ', formattedError);
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment