Quantcast
Channel: Kodi Community Forum - All Forums
Viewing all articles
Browse latest Browse all 84005

Catch recorded video and Upload

$
0
0
Hi,

I'm shooting a video, and I can not see it after recording.
Below the code I capture the information of the house that pushes video:

Code:
- (vido)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info

{        

        NSString * moviePath = [[info objectForKey:UIImagePickerControllerMediaURL] path];
        if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum (moviePath)) {
            UISaveVideoAtPathToSavedPhotosAlbum (moviePath, nil, nil, nil);
        }

        [self dismissViewControllerAnimated:YES completion:^{

        Camera = YES;

}];

    //Save the movie
    VideoRecord = moviePath;
    NSLog(@"Video recorded: %@ - %@", info , moviePath);
}

-(IBAction)PlayVideo:(id)sender{

    NSString * filepath = [[NSBundle mainBundle] pathForResource:VideoRecord ofType:@"MOV"];
    NSURL * fileURL = [NSURL fileURLWithPath:filepath];

    

    moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
    [moviePlayerController.view setFrame:CGRectMake(20, 76, 280, 199)];
    [self.view addSubview:moviePlayerController.view];
    //moviePlayerController.fullscreen = YES;
    [moviePlayerController play];

}

I created an IBAction to give the play the video that I recorded, but for some reason, the MPplayer only a black screen and not turning the video.

I also tried to return the video with [info objectForKey: UIImagePickerControllerMediaURL] , without the "path" as in the above code.
The way the video returns me with a "file :/ /", and thus, it generates an error and crashes the app.

Viewing all articles
Browse latest Browse all 84005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>