aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
715 stars 472 forks source link

Question: Maximum videotiles and how to release them #823

Closed lajuffermans closed 3 years ago

lajuffermans commented 4 years ago

Hi all,

I'm breaking my head here and came pretty far with the documentation which is pretty good and clear but I have have one issue I can't figure out.

Example:

The problem I currently have is that all available videotiles are filled by the first 16 people who join. How can I make sure that attendee number 20 gets a spot when he starts talking?

I already tried using videoTileController.removeVideoTile to free a spot. But how can I make sure attendee number 20's videotile is added?

bradmanAWS commented 4 years ago

Hi @lajuffermans , yes, the SDK supports 16 video tiles and 250 participants. You can find more info here: https://aws.amazon.com/chime/chime-sdk/faq/

This is a bit difficult to give clear advice without knowing your implementation. Have you tried testing something like this in our demo? Try running our meeting demo, adding more than 16 participants, and let us know if the behavior is different than the behavior in your app.

lajuffermans commented 4 years ago

That was a pretty good idea, I've tried the meetingV2 demo today with 18 attendees... all video enabled. The video of the first 16 attendees is shown, the others not (as expected). When the first 16 leave, attendee 17 and 18 are still not automatically shown (no videoTileDidUpdate triggered?) however there are videotiles available (I've checked audioVideo.getAllRemoteVideoTiles().length). When they toggle their videoInput they are eventually shown.

Can it be that videoTileDidUpdate is not triggered when a spot is free? Is it a bug or is there another way to take an available tile?

RalphLincoln commented 4 years ago

Can I see your implementation.........

lajuffermans commented 4 years ago

This was done with the original "meetingV2" sample.... no changes. I'll have a look if I can clarify some things later today/tomorrow.

lajuffermans commented 4 years ago

Maybe this video: https://magicmonkey.nl:5001/sharing/dwvMYerQW clarifies my issue a bit.

I used the "meetingV2" sample with some additional logs, no technical changes. All my attendees join and enable their webcam, "Blue Screen - 0" is the last one with an available videotile. "Blue Screen - 1" joins and enables his webcam, however videoTileDidUpdate isn't triggered (because there is no spot left). So far all like expected.

Now "Blue Screen - 0" leaves, videoTileRemoved is triggered and a videoTile came free (getAllRemoteVideoTiles returns 14). However there is not a videoTileDidUpdate triggered for "Blue Screen - 1" so his webcam isn't shown.

Is this a bug? Or how can I make sure "Blue Screen - 1" is shown? (without asking him to switch off/on his webcam).

LoganArnett commented 4 years ago

+1 on this, would definitely like to see an approach for this

abhijeet-toptal commented 3 years ago

https://github.com/aws-samples/amazon-chime-sdk-smart-video-sending-demo

lajuffermans commented 3 years ago

@abhijeet-toptal A bit cryptic answer... Am I right that you use websockets (the sendMessage command) to disable "localVideo" and enable the "videoPreview" instead? 🤔

p-foucht commented 3 years ago

@lajuffermans That's correct, that repo is an example of how to manage more video tiles by utilizing websocket commands messages and local video previews. The backend maintains state about the meeting and shared videos, and sends websocket command messages to instruct attendees when to transition from Video Preview -> Share video (or vice versa, when an attendee needs to transition off of the "feed")

devalevenkatesh commented 3 years ago

Just to add you can also come via the AWS support channel to discuss your app specific use case.

nicklera1 commented 3 years ago

@lajuffermans You can listen to the Observer named videoAvailabilityDidChange and it's object canStartLocalVideo as true/false to determine whether there is a slot available to start video upon availability.

This Issue https://github.com/aws/amazon-chime-sdk-js/issues/989#issuecomment-767080808 has more references related to this.

vidya-mohan commented 3 years ago

@lajuffermans we hope you have the data you need from the above responses. Resolving the issue for now

lajuffermans commented 3 years ago

@nicklera1 I use that observer now 👌

@vidya-mohan the messaging approach seems to be working in a test setup, will need to check how it works in real life.