awslabs / amazon-kinesis-video-streams-webrtc-sdk-js

JS SDK for interfacing with the Amazon Kinesis Video Streams Signaling Service.
https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-js/examples/index.html
Apache License 2.0
288 stars 145 forks source link

Conference Call Using AWS Kinesis #79

Closed naveedaziz closed 4 years ago

naveedaziz commented 4 years ago

Is it possible that we can have rooms and can have conference call using this service

lherman-cs commented 4 years ago

Yes, it's possible. The easiest way to this would probably be using a mesh structure. Please see https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-js/issues/69, somebody else has done it and shared their architecture. I think it's going to be really helpful!

naveedaziz commented 4 years ago

As i don't have the sample code from the #69 and also i am working on VueJS. The concept for mesh is to create Mater and Viewer loop channel for each participant. In simple each participant will be master for publishing and Viewer for event other stream. Is it right ? Also i am struggling with WebRTC from last 5 months, as WebRTC explained by google wont work all the time with different devices even with TURN server. Mostly in IOS devices. Whats the best optimization Kinesis provide over WebRTC so i can finalize the services for my SAAS base projects and for long too. Thanks for the support

lherman-cs commented 4 years ago

You can find the source code here, https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-js/issues/69#issuecomment-651268485 and the fix https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-js/issues/69#issuecomment-653051733. ReactJS and VueJS have similar concepts and they're just frameworks. So, the flow should be fundamentally the same.

The concept for mesh is to create Mater and Viewer loop channel for each participant. In simple each participant will be master for publishing and Viewer for event other stream. Is it right ?

Yes, this is correct.

Also i am struggling with WebRTC from last 5 months, as WebRTC explained by google wont work all the time with different devices even with TURN server. Mostly in IOS devices. Whats the best optimization Kinesis provide over WebRTC so i can finalize the services for my SAAS base projects and for long too. Thanks for the support

When you're using WebRTC in the browser, the implementation will depend on the browsers, we only support the signaling part. I'd be more happy to help you, but could you give more context? What things that didn't work? What explanation from Google are you referring to?

naveedaziz commented 4 years ago

Thanks for the support. I want to make clear whats means by signaling part of webrtc is "we only support the signaling part". Does it support the services we can use using websockets or socket.io or it has also some more functionalities involve in signaling server. As i was using socket.io using aws elasticbean and never got any issue in signaling. The issue was in IOS (iphone X or XI) the receiver got a call but wont show video sometimes and sometimes audio was not there. These kind of issues i am facing from last 4 months in which i learn and adopt webrtc. I have created lot of media servers in aws ec2 but all has different issues. I just want to make clear what kinesis helps in addition to webrtc service define by mozilla or google.

lherman-cs commented 4 years ago

@naveedaziz in webrtc apps, normally you need STUN (for getting your external IP address and port), TURN (in case webrtc can't get your external IP address and port from STUN), and signaling server and protocol (this is left out from the webrtc standard to provide high flexibility in how you send messages before you're connected).

KVS WebRTC manages STUN, TURN, and signaling server and protocol! What this means is that you don't have to use aws elasticbean to manage your own signaling server. Also, you don't need to use socket.io since our SDK also handles that already. Please see our example for your reference, https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-js/tree/master/examples.

In summary, if you use KVS WebRTC, you will only need to write the frontend side (connect the SDK with your UI), everything else is handled by us.

naveedaziz commented 4 years ago

Thanks for all quick support. I am creating all and will ask if need anything else. Thanks for all support

pozhega commented 3 years ago

@naveedaziz have you ever managed to finish up the implementation. I'm building the system where I need mesh structure (N:N) where 2 < N < 5 but I'm sceptic about the actual performance and complexity. Can you share your experiences? Thank you.