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 –