Hi again!
I've using the library for a couple of projects and works perfectly. I've made some modifications that I'd like to discuss.
amazon-kinesis-video-streams-webrtc v2 released: I do not see why they decided to bump major... I created a test branch and run the tests and everything worked. Just in case you want to take a look at it
Switch between multiple channels: As previously discussed in #17 , my tests were successful, I'll create another PR to discuss it and make a proper implementation
Finally, regarding this PR. In my application I found useful to be able to react to connectionstate change events, for example if the connection state is failed I will report and error:
function handleConnectionChange() {
console.log('New connection state: ', peerConnection?.connectionState)
if (peerConnection?.connectionState === "failed") {
setPeerError(new Error("peer disconnected"));
}
}
In this PR I tried a more general approach and just report the event change to manage it in the parent component, but maybe you come up with a better idea. Probably some work must be done in useMaster too
Hi again! I've using the library for a couple of projects and works perfectly. I've made some modifications that I'd like to discuss.
amazon-kinesis-video-streams-webrtc
v2 released: I do not see why they decided to bump major... I created a test branch and run the tests and everything worked. Just in case you want to take a look at itconnectionstate
change events, for example if the connection state isfailed
I will report and error:In this PR I tried a more general approach and just report the event change to manage it in the parent component, but maybe you come up with a better idea. Probably some work must be done in
useMaster
too