In MPMoviePlayer when movie player enters in a full screen & when i pressed done button it will exit full screen is there any other method by which i can exit the fullscreen mode programmatically of mpmoview player.?
After looking into the MPMoviePlayerController Class Reference I came across an instance method called:
- (void)setFullscreen:(BOOL)fullscreen animated:(BOOL)animated
And the definition of the method states clearly Causes the movie player to enter or exit full-screen mode.You might want to consider using this method when exiting the fullscreen mode by setting the boolean value of the fullscreen parameter to NO.
Hope this helps!
Related
I am calling a youtube channel on a UIWebView. When user selects a video, device launches its video player as normal. However, when video ends or user finishes it returning to view, an offset is applied to whole app!! All views have an offset on top but this only happens on iPad and iPad simulator with compatibility mode, on iPhone and iPhone simulator not! How to solve it? Thank you.
Problem is that status bar dissapears after video execution.
[[UIApplication sharedApplication] setStatusBarHidden:NO]; problem is beeing solved when an event is fired using NSNotificationCenter
In the MainViewController, I have a play/pause button. I was having problem in coding for the pause function because when i was using audio player pause it was pausing only the audio player but in background my application was still executing. I have used NSTimer for displaying various UIViewControllers. While audio player is paused it is still displaying UIViewControllers because of NSTimer.Whereas i wanted complete pause audio player & application execution as well at the same time.
I found this -applicationwillresignactive. Do you think this -applicationwillresignactive can help me when i want complete pause audio player plus application pause.
Please suggest.
applicationWillResignActive and applicationDidEnterBackground are called when home button is pressed.
In one View Controller ViewController1, I have tried to open a You tube video embedded in a UIWebview. It opens in the Movie Player window and then I use the "Done" button to come out of the movie player window. Again in another view controller ViewController2 in the same application, I open a MPMoviePlayerController(MPMoviePlayerController *audioplayer) to play an audio file using streaming. However, it remains in the paused state on opening the player. Even when i call the method [audioplayer play], the application automatically sets back the playback state to paused (i rechecked and it is not done through my code).
But if i reopen the application and in view controller ViewController2 i play the audio alone, then MPMoviePlayerController *audioplayer plays successfully.
Any idea what i might be doing wrong ?
This issue was found to be specific only to ios4.0.
This issue doesnt occur in ios4.1 and above.
If I press on Home Button, or switch to another app, while MPMoviePlayerViewController on screen, and open app again it shows UIViewController who sent
moviePlayerViewControllerAnimated:.
How can I just pause my video like youtube app?
There is an option in the project's plist.The option is "Application does not run in background",May this is set to YES.This may be one reason
In my viewWillAppear:(bool)animated method I want to stop video playing. How can I do this? I am new I don't know much.
I am playing a video on this screen. I have a tab which shows table view. When I click on the tab the table view is shown but video is playing in background: we can hear the music.
If you are using MPMoviePlayerController, call -pause on that object.