in amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/internal/contentshare/DefaultContentShareVideoClientController.kt [49:80]
override fun startVideoShare(videoSource: VideoSource) {
// Start the given content share source
if (eglCore == null) {
logger.debug(TAG, "Creating EGL core")
eglCore = eglCoreFactory.createEglCore()
}
// Start video client only when not currently sharing
if (!isSharing) {
if (videoClient == null) {
initializeVideoClient()
}
if (!startVideoClient()) {
ObserverUtils.notifyObserverOnMainThread(observers) {
it.onContentShareStopped(
ContentShareStatus(
ContentShareStatusCode.VideoServiceFailed
)
)
}
return
}
}
logger.debug(TAG, "Setting external video source to content share source")
videoSourceAdapter.source = videoSource
videoClient?.setExternalVideoSource(videoSourceAdapter, eglCore?.eglContext)
logger.debug(TAG, "Setting sending to true")
videoClient?.setSending(true)
isSharing = true
}