-
Notifications
You must be signed in to change notification settings - Fork 84
Streaming Video #53
Description
Is there a specific way of streming video in owncloud ios library? I 'm using below code to stream video from our owncloud server.
@Property (nonatomic, strong) MPMoviePlayerController *moviePlayerController;
.
.
.
-
(void)openVideo {
NSString* filePath = [self.videoItem.filePath stringByAppendingString:self.videoItem.fileName];// fileurl is full path of a video file like "http://xxxx.com/remote.php/webdav/video.mp4"
NSURL* fileurl=[NSURL URLWithString:[[[BoxAPI sharedBoxAPI] serverUrl] stringByAppendingString:filePath]];
NSLog(@"opening video at > %@",[[[BoxAPI sharedBoxAPI] serverUrl] stringByAppendingString:filePath]);
self.moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL: fileurl];
self.moviePlayerController.fullscreen = YES;
self.moviePlayerController.movieSourceType = MPMovieSourceTypeFile;
self.moviePlayerController.view.frame = self.view.bounds;[self.view addSubview:self.moviePlayerController.view];
[self.moviePlayerController play];[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(videoFinished:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:self.moviePlayerController];
}
-(void)videoFinished:(NSNotification*)notification
{
NSLog(@"Video end..");
}
but I'm getting
2014-09-09 09:40:42.491 ibb box[4021:60b] _itemFailedToPlayToEnd: {
kind = 1;
new = 2;
old = 0;
}
video does not play. I'm setting credidentals with
-
[[AppDelegate sharedOCCommunication] setCredentialsWithUser:[self user] andPassword:[self password]];
method before making request. I couldn't find any solution to this. please help..