0

I'm trying to wire ooVoo into my app. (*ooVoo is video chat framework) But I'm stuck in very first stage, which is opening preview. It just showing blank black. What am I missing?

following is my code. (also I uploaded my project here https://github.com/lossefanya/OovooTest)

self.oovooClient = [ooVooClient sharedInstance];
[self.oovooClient authorizeClient:OOVOO_TOKEN completion:^(SdkResult *result) {
    [self.oovooClient.Account login:@"tester" completion:^(SdkResult *result) {
        VideoPanel *videoPanel = [[VideoPanel alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
        self.oovooClient.AVChat.delegate = self;
        self.oovooClient.AVChat.VideoController.delegate = self;
        [self.oovooClient.AVChat.VideoController bindVideoRender:nil render:videoPanel];
        [self.oovooClient.AVChat.VideoController openCamera];
        [[KGModal sharedInstance] showWithContentView:videoPanel];
    }];
}];

FYI, I've read and followed their documents and sample code. https://github.com/oovoodev/Documentation/blob/master/iOS%20Documentation/Development%20Guide%20-%20iOS.md

1 Answers1

0

I couldn't understand why. But I found that ooVoo VideoPanel should have parent view. like following

self.oovooClient = [ooVooClient sharedInstance];
[self.oovooClient authorizeClient:OOVOO_TOKEN completion:^(SdkResult *result) {
    NSLog(@"ooVoo init: %@", result);
    [self.oovooClient.Account login:@"tester" completion:^(SdkResult *result) {
        NSLog(@"ooVoo login: %@", result);
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
        VideoPanel *videoPanel = [[VideoPanel alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
        [view addSubview:videoPanel];
        self.oovooClient.AVChat.delegate = self;
        self.oovooClient.AVChat.VideoController.delegate = self;
        [self.oovooClient.AVChat.VideoController bindVideoRender:nil render:videoPanel];
        [self.oovooClient.AVChat.VideoController openCamera];
        [[KGModal sharedInstance] showWithContentView:view];
    }];
}];