1
我想提供屏幕共享开启/关闭 iOS的功能使用Tokbox。在iOS中开启/关闭Tokbox屏幕共享目标C
我可以切换到设备屏幕共享,但在共享屏幕后,我无法切换回设备Camara。
我用以下代码尝试过。
-(void)toogleScreen{
if (isSharingEnable == YES) {
isSharingEnable = NO;
NSLog(@"%@",_publisher.description);
_publisher.videoCapture = nil;
[_publisher setVideoType:OTPublisherKitVideoTypeCamera];
_publisher.audioFallbackEnabled = YES;
} else {
isSharingEnable = YES;
[_publisher setVideoType:OTPublisherKitVideoTypeScreen];
_publisher.audioFallbackEnabled = NO;
TBScreenCapture* videoCapture =
[[TBScreenCapture alloc] initWithView:self.view];
[_publisher setVideoCapture:videoCapture];
}
}
他们有一个加速器包来做到这一点。 https://github.com/opentok/screensharing-annotation-acc-pack –