How to read a screen share stream from web on android?

Hi Guys,

We are using the react & android builds from OpenVidu tutorials for our project.

We have tested all the scenarios and came across an issue when we tested screen cast or screen share.

When the host initiates a screen share on the web, all the participants using the react build in the web browser either in their laptop or mobile phone can see this screen share.

But for those users using the native android code there is an issue. The screen share video does not appear and the video of the host that they were seeing also gets stuck.

So far, I have debugged and learnt that the media server sends a participant unpublished event as soon as the host initiates the screen share, the subsequent calls are triggered with “participantpublished” & “sendMessage” containing the information isScreenShareActive : true and typeOfVideo : SCREEN.

As soon as these events are triggered the hosts video gets stuck & there is no update of the screens share for the participants.

It would be very helpful if someone can guide me with resolving this perticular issue.

Thanks in advance,
Sidharth

Hello @Sidharth,

I’m sorry but native Android is not supported. Android demo is a proof of concept and there is no proper OpenVidu SDK. If you manage to solve the issue, please share with the community (PRs are welcome) so others can benefit from it.

Regards

Hi micael.gallego,

I get it.

Like you suggested, I am working on it.

Please let me know if the below description makes sense logically, if not please correct me.

We know for a fact that when a user tries to perform screen share, the stream information is shared appropriately like mentioned above.

Now, can I add this stream as a new participant ?

Would this work?

Thanks in advance!

Yes, you can add screenshare as a new participant in the session. This is how OpenVidu Call works.

Hi micael.gallego,

Thanks for the reply!

I tried to execute as mentioned above. I was able to render screen share as a new participant but the screen video was not populating.

What am I missing ?

Thanks in advance!

I don’t know. You can take a look to OpenVidu Call front end code to learn how we have implemented it.

@CSantosM, do you have a complete code snippet with a participant publishing screenshare to share.with @Sidharth?

Regards

You can see in our docs how to share your screen https://docs.openvidu.io/en/2.15.0/advanced-features/screen-share/#chrome-72-opera-based-on-chrome-72-safari-130-and-firefox-66.

If you want to publish your screen and camera at the same time, you need two OV objects and two Sessions

Hi @Sidharth Could you share the details on how you implemented screen share on android.
One solution that i found was screen casting and then using and adding its video stream to the session as a participant so that it can be visible to every other participants.
If possible a github link to that project would help.

Regards,
Viren