I am using Screen Sharing module of Open Tok.
I want to get camera input using AVCaptureVideoPreviewLayer
and share the screen by Open Tok, but the preview layer is not being shared. All other controls are shared though.
How can I achieve this?
I am using Screen Sharing module of Open Tok.
I want to get camera input using AVCaptureVideoPreviewLayer
and share the screen by Open Tok, but the preview layer is not being shared. All other controls are shared though.
How can I achieve this?
The Screen sharing app in the OpenTok/Tokbox SDK basically uses drawViewHierarchyInRect:afterScreenUpdates: or renderInContext: Looks like they work correctly if the view is rendered in OpenGL context vs CALayer of AVCaptureVideoPreviewLayer. Hence instead of going the route of AVCaptureVideoPreviewLayer,you can just add an OTPublisher view and screen sharing will work. OTPublisher has an OpenGL ES rendering btw in TBExampleVideoRender.If you want to modify the display in any way you can change TBExampleVideoRender.
If you don't want to use OTPublisher then do a passthrough of the camera video to OpenGL ES or follow the sample here to achieve the same (my guess).