I am developing a app which will be on both platform android and IPhone.
the app is about record video and post to server and users can see that video on their home feed of app.
i am successfully recorded video and uploaded it on server from both IPhone and android. video is uploaded in base64 format to server and server converts that into video and save it on server.
but unable to play video recorded from android on IPhone. video recorded from IPhone can be played in android.
video is recording in .mp4 format in both platform.
i have paste my code for recording video in android and code for playing video in iphone
Please if anyone can help me is appreciated
Code for recording video in Android:-
Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
intent.putExtra("android.intent.extra.durationLimit", 7);
intent.putExtra(android.provider.MediaStore.EXTRA_VIDEO_QUALITY,0);
Code for play video in IPhone(Live Streaming) from URL
MPMoviePlayerViewController* movieController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:@"http://journeyappadmin.appealsoft.com//storedata//ExpVideos//420_v635296694326445312.mp4"]];
movieController.moviePlayer.controlStyle=MPMovieControlStyleFullscreen;
movieController.view.frame = CGRectMake(0, 0, 320,400);
[self presentViewController:movieController animated:YES completion:nil];
[movieController.moviePlayer prepareToPlay];
[movieController.moviePlayer play];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:movieController];
- (void)moviePlayBackDidFinish:(NSNotification *)notification {
[[NSNotificationCenter defaultCenter]removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
[movieController dismissModalViewControllerAnimated:YES];
}
Error:
_itemFailedToPlayToEnd: {
kind = 1;
new = 2;
old = 0;
}