Closed cyuste closed 2 years ago
@cyuste My mistake, the wiki example is missing a default value for peer
. I've updated the example:
const {
error,
peer: { media } = {},
} = useViewer(config);
@pdcarroll , thank you very much for your help.
I've been playing a little bit with your (great) component and it works just fine in my webpage with these changes. I'm using Amplify/Cognito auth and the credentials I get are temporary, so I need to use sessionToken.
As you can see, I introduced another change that you might find useful: In my current scenario, I'm creating a webrtc connection to one of the many cameras that a device has and the user can switch over other camera using a drop-down menu. When I tried to switch I received errors complaining that the signalingChannel was already opened so I had to slightly modify how the closure is done to allow this. If you are interested, take a look at it and let me know what you think. Maybe the code can be improved but the idea is there :)
@cyuste I agree, switching media sources seems like a useful feature. I think that change may require a bit more testing. Would you mind moving your changes related to channel switching into a new PR? That way I can go ahead and merge your sessionToken
changes so that it's not blocked by the other feature. Thanks so much for the contrubutions!
@pdcarroll , reverted changes not related with the use of sessionToken
. In the following weeks I will also test how well does it cope with connections issues, I'll keep you updated.
Thank you again!
Allow using temporary credentials, for example when using amplify + cognito authentication.
Couldn't test because currently I'm getting a failure in the viewer example,
here
If you could help me with that issue I can polish this PR :)