Vonage-Community / sample-video-flutter-app

Apache License 2.0
5 stars 1 forks source link

How can I remove publisher view for multi video? #7

Open bizk-sato opened 1 year ago

bizk-sato commented 1 year ago

I don't want to show the publisher's own video.

I tried to delete codes below in MultiVideo#initSession(), but dosen`t work.

publisher?.view?.id = R.id.publisher_view_id
multiVideoPlatformView.mainContainer.addView(publisher?.view)

It seems like they show publishers own view automatically. Is there any way not to show it?

devwithzachary commented 1 year ago

In this example, the layout is calculated in MultiVideo#calculateLayout()

We expressly set the location of the publisher's view. If you need a multi-video layout but without the publisher, you will need to remove the R.id.publisher_view_id view and re-write the logic for the layout to decide where each video should be on the screen (and what to do with the situation when there are no subscribers.