i am trying to play video in MPMoviePlayerViewController, working fine in normal mode but once i click for full screen , i am not able to play

i am trying to play video in MPMoviePlayerViewController, working fine in normal mode but once i click for full screen , i am not able to play

self.videoURL = [NSURL URLWithString:MyURL];;
self.previewView.hidden=NO;
self.videoController =[[MPMoviePlayerController alloc] initWithContentURL:self.videoURL];
// [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
[self.videoController.view setFrame:self.previewView .frame];
// self.videoController.movieSourceType=MPMovieSourceTypeStreaming;
self.videoController.view.center=self.playBtn.center;
[self.previewView addSubview:self.videoController.view];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoPlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:self.videoController];
    self.videoController.scalingMode = MPMovieScalingModeAspectFit;
    self.videoController.controlStyle = MPMovieControlStyleNone;

    [self.videoController play];

any help will be appreciable.
Thank You


Source: ios

Leave a Reply