MPMoviePlayerController view is not adding to view controller
<p>i am writing code to play video file in ownservices.m class in a method like this.</p>

<p>-(void)playVediofile:(NSString *)vedioFileName  {</p>

<pre><code>NSLog(@"playing vedio file ");
NSURL *movieUrl = [NSURL fileURLWithPath:
                   [[NSBundle mainBundle] pathForResource:vedioFileName ofType:@"mp4"]];

MPMoviePlayerController* myMovie=[[MPMoviePlayerController alloc] 
                                  initWithContentURL:movieUrl];

myMovie.scalingMode = MPMovieScalingModeNone;

myMovie.initialPlaybackTime = 2.0;

[[NSNotificationCenter defaultCenter] addObserver:self 
                                         selector:@selector(movieFinished:) 
                                             name:MPMoviePlayerPlaybackDidFinishNotification 
                                           object:myMovie]; 

[self.viewcontroller addSubview:myMovie.view];

[myMovie play];
</code></pre>

<p>}</p>

<p>i am calling this method from ownservicesviewcontroller.m class like this In a button click event.</p>

<pre><code>ownServices *obj = [[ownServices alloc]init];
        [obj playVediofile:@"Movie"];
</code></pre>

<p>i am getting audio of the video clip,but it did n't display video.</p>

<p>but i am add MPMoviePlayerController view to viewcontroller.</p>

<p>i did n't get why it is not displaying. </p>

<p>why i am doing in seperate classes is because my requirement is like that,need to maintain all the methods in ownservices class and call them from ownservicesviewcontroller.m</p>

<p>can any one please help me.</p>

<p>Thank you.</p>
