Kodi Community Forum
iOS Catch recorded video and Upload - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: iOS Catch recorded video and Upload (/showthread.php?tid=161520)



Catch recorded video and Upload - arielcugenotta - 2013-04-04

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.


RE: Catch recorded video and Upload - Memphiz - 2013-04-05

Can you clarify what this has to do with xbmc development please?