Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Streaming Video #53

@EmrahKK

Description

@EmrahKK

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..

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions