Screen Share
Flutter SDK provides support for sharing the entire screen of the device to the room.
Please note that for a peer to share their screen, their role must have screenshare enabled in the dashboard. Also select the appropriate resolution that you desire the screenshare track should be of.
How to start screenshare from the app
To start screen share, app needs to call the startScreenshare
method of HMSSDK
.
Following is the snippet on how to use this:
How to get Screen Share Status
Application needs to call the isScreenShareActive
method of HMSSDK
.
This method returns a Boolean
which will be true inscase ScreenShare is currently active and being used, and False for inactive state.
How to stop screenshare
To stop the screenshare, you need to invoke stopscreenShare
method of HMSSDK
Following is the snippet on how to use this:
DONOT forget to add the permission for foreground service in AndroidManifest.xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />