@Pawan Yadav Regarding your question, the Azure Communication Services calling library does support screen sharing. However, the library does not provide a built-in UI for screen sharing. You will need to implement the UI for screen sharing yourself.
Here is an example of how you can implement screen sharing using the Azure Communication Services calling library in Android:
- First, you need to create a
LocalVideoStream
object for the screen sharing stream. You can do this by calling theDeviceManager.createScreenSharingStream()
method.
DeviceManager deviceManager = callClient.getDeviceManager();
LocalVideoStream screenSharingStream = deviceManager.createScreenSharingStream();
- Next, you need to add the screen sharing stream to the call. You can do this by calling the
Call.startScreenSharing()
method.
call.startScreenSharing(screenSharingStream, new StartCallOptions(), new RemoteVideoStreamAddedListener() {
@Override
public void onRemoteVideoStreamAdded(RemoteVideoStreamAddedEvent remoteVideoStreamAddedEvent) {
// Handle the remote video stream added event
}
});
- Finally, you need to render the screen sharing stream on the UI. You can do this by creating a
VideoStreamRendererView
object and attaching it to theRemoteVideoStream
object.
RemoteVideoStream remoteVideoStream = remoteVideoStreamAddedEvent.getRemoteVideoStream();
VideoStreamRendererView videoStreamRendererView = new VideoStreamRendererView(context);
remoteVideoStream.addRenderer(new VideoStreamRenderer(videoStreamRendererView, ScalingMode.Crop));
Please note that this is just an example and you will need to modify it to fit your specific use case. Also, make sure to handle any errors that may occur during the screen sharing process.