Closed MichaelJCole closed 8 years ago
Tried this code but it doesn't work either. The callback is never called.
getScreen: function() {
console.log(Helpers.connectForm.skylink.shareScreen);
Helpers.connectForm.state.set('checkedScreen', true);
Helpers.connectForm.skylink.shareScreen(function(error, success) {
if (error){
console.log(error);
} else {
console.log(success);
}
});
},
I see the shareScreen
function and can read it.
Stepping through the code, these breakpoints are never triggered:
try {
window.getUserMedia(settings, function (stream) {
self.once('mediaAccessSuccess', function (stream) { // breakpoint never triggered
if (self._inRoom) { // breakpoint never triggered
shareScreen
does work if it's called in Meteor's Template.templateName.onCreated()
function, but not in these event handlers.
PS. For whatever reason the event mediaAccessSuccess
is not being triggered.
Our next update of AdapterJS should address this issue for the most part. I will update here when that has been published, should be out in the next few days.
Awesome! Thanks!
This should return an error in the shareScreen callback instead of throwing in the console
Hi @MichaelJCole, I would like to check if the 0.6.4 release did fix the issue you have. Does it still occur for you?
Hey Leticia, thanks for checking in. I switched to SimpleWebRTC with a Xirsys backend.
Thanks for the response, we will be closing this ticket then.
Hey, I'm using
getUserMedia()
to get the screen.Unless I'm misunderstanding, I noticed the Skylink code is throwing exceptions, instead of using the callbacks. This means my error callbacks are not happening which is a bummer.
Here's an excerpt from
skylink.complete.js
:Based on what I've learned about async error handling, those thrown errors cannot be caught.
I would expect more this behavior:
You could wrap the whole thing in a try{} catch(){}, but that gets tricky. If I'm misunderstanding please let me know. Here's my use case that isn't working:
The function is intended to check if the user can share the screen. If so, attach it to browserCheck video.
Otherwise, set some state so the form can react. Somewhere else shows the user a message based on the state of
checkedScreen
ancanScreen
In the console I see:
In Chrome, the share dialog comes up, I share the screen, but neither of my callbacks get called
function(stream)
orfunction(error)
I am successfully getting mic and camera in another prior
navigator.getUserMedia()
call.getScreen()
is called from clicking a button.How are you testing and catching these thrown exceptions? Am I missing something?
Thanks for any help!