Note that there are some explanatory texts on larger screens.

plurals
  1. POVideo not playing in IOS
    primarykey
    data
    text
    <p>I am downloading a video like this..</p> <pre><code>-(IBAction)buttonPress:(id)sender{ movieURL = [NSURL URLWithString:@"https://www.dropbox.com/s/Screen%20Capture2013-01-31%2014_21_22.mov"]; NSURLRequest *theRequest = [NSURLRequest requestWithURL:movieURL cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60]; NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self startImmediately:YES]; if( connection ) { receivedData = [[NSMutableData alloc] initWithLength:0]; } else { //[delegate ConnectionFailed]; } } - (void) connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; [receivedData setLength:0]; } - (void) connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [receivedData appendData:data]; NSLog(@"dee- %@",receivedData); } - (void) connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; // [connection release]; } - (NSCachedURLResponse *) connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse { return nil; } - (void) connectionDidFinishLoading:(NSURLConnection *)connection { [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; // [connection release]; [self movieReceived]; } </code></pre> <p>But I am not able to play this video. Please help me to save and play this video.</p> <p>i have tried this but doesnt work.\</p> <pre><code>-(void)movieReceived{ MPMoviePlayerViewController* tmpMoviePlayViewController=[[MPMoviePlayerViewController alloc] initWithContentURL:movieURL]; if (tmpMoviePlayViewController) { tmpMoviePlayViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentViewController:tmpMoviePlayViewController animated:YES completion:nil]; tmpMoviePlayViewController.moviePlayer.movieSourceType = MPMovieSourceTypeFile; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieViewFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:tmpMoviePlayViewController]; [tmpMoviePlayViewController.moviePlayer play]; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload