mpmovieplayercontroller

Detect when a webview video becomes fullscreen on ios8

感情迁移 提交于 2019-12-17 15:56:41
问题 I have an app where users can open videos from UIWebview, including Youtube ones. In iOS7, I was able to get a notification when it started playing, or when it became full screen, which is vital for me to show certain options to the user and modify the interface. I used to use this: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(VideoExitFullScreen:) name:@"UIMoviePlayerControllerDidExitFullscreenNotification" object:nil]; [[NSNotificationCenter defaultCenter]

MPMoviewPlayerController fullscreen playback rotation with underlying UIViewController with portrait mode only (rotation disallowed)

元气小坏坏 提交于 2019-12-17 15:36:11
问题 Hallo, I have a simple application, which does contain UITabBarController with two UIViewControllers. Both UIViewControllers are portrait only (no rotation allowed). One UIViewController's UIView does contain MPMoviePlayerController's view to allow video playback inside this view with possibility to make it fullscreen via controls (MPMovieControlStyleEmbedded). The code is simple and does look like ... __moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:@

How to play video stream with MPMoviePlayerController in iOS

烈酒焚心 提交于 2019-12-17 10:34:15
问题 I am trying to play a video stream from the internet on the iPhone by pressing a button. I used many code samples but nothing worked. With this code it opens a black view without any video stream or controls in it. (The stream itself works.) NSURL *url = [NSURL URLWithString:@"http://MyStreamURL.com"]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish

How can I know users click fast forward and fast rewind buttons on the playback controls in iPhone

我的梦境 提交于 2019-12-17 10:33:20
问题 I want to implement the following things, App is running a music or video (using MPMoviePlayerController ) in background. User double clicks the home button and go to the first screen showing playback controls (fast rewind, play or pause, fast forward buttons) User click fast rewind or fast forward button. Then app play previous or next music or video. For the 3rd step, I should know which button is clicked. (As I naturally know, the currently playing item is paused, stopped.. using

How can I know users click fast forward and fast rewind buttons on the playback controls in iPhone

情到浓时终转凉″ 提交于 2019-12-17 10:33:10
问题 I want to implement the following things, App is running a music or video (using MPMoviePlayerController ) in background. User double clicks the home button and go to the first screen showing playback controls (fast rewind, play or pause, fast forward buttons) User click fast rewind or fast forward button. Then app play previous or next music or video. For the 3rd step, I should know which button is clicked. (As I naturally know, the currently playing item is paused, stopped.. using

streaming audio player for background play

喜你入骨 提交于 2019-12-14 04:14:46
问题 Currently, I am developing an app in which there is need of play an streaming audio. I am using mpmovieplayercontroller to play streaming audio. It is working fine for me. However, the audio is stopping when the device goes into sleeping mode or enters into background mode. I want to play audio also in these two mode condition. How can I play streaming audio in these two modes? I am also open to another player. 回答1: I'd check out Matt Gallagher's Audio Streamer. I use it in an audio streaming

MPMoviePlayerController hide volume slider

早过忘川 提交于 2019-12-13 08:45:40
问题 I was wondering if anyone knew of a way to hide the volume slider while playing a video in fullscreen mode but retaining the standard controls such as play/pause, previous/next etc Thanks 回答1: Just a suggestion, totally untested :) for (UIView *view in [volumeSlider subviews]) { if ([[view isKindOfClass:[MPVolumeSlider class]]) { [view setHidden:YES]; } } 来源: https://stackoverflow.com/questions/12159735/mpmovieplayercontroller-hide-volume-slider

MPMoviePlayerController Getting Thumbnail from Streaming Video?

橙三吉。 提交于 2019-12-13 05:49:15
问题 I'm trying to get a Video Thumbnail from Streaming Video when touched to a Button. I've used both; - (UIImage *)thumbnailImageAtTime:(NSTimeInterval)playbackTime timeOption:(MPMovieTimeOption)option - (void)requestThumbnailImagesAtTimes:(NSArray *)playbackTimes timeOption:(MPMovieTimeOption)option But everytime, returned image is null, or getting error below; Error Domain=AVFoundationErrorDomain Code=-11838 "Operation Stopped" UserInfo=0x7ac5560 {NSLocalizedFailureReason=The operation is not

MPMoviePlayerController | How to play part of Video

徘徊边缘 提交于 2019-12-13 05:15:08
问题 I am using MPMoviePlayerController to play video. I want to play part of video on clicking play button. For example if my video is of 200 seconds, i want to play video from 50th-100th second. Even i'm not able to get time-length video played at particular instance like at the time of pausing. 回答1: MPMoviePlayerController has two properties: initialPlaybackTime and endPlaybackTime that you can set to an NSTimeInterval (= double used to specify a time interval in seconds) to control the start

MPMoviePlayerController does not change Orientation in full-Screen mode in iOS 5

岁酱吖の 提交于 2019-12-13 04:53:23
问题 In my app i support only portrait mode and use UINavigationController as RootViewController . But when i am playing movie using MPMoviePlayerController and Player is Fullscreen than i want it to support both landscape mode Also. Does this using this great code by @ChrisBallinger this in iOS6 but its not working in iOS5 After long search on google i am not able to find the solution so posted here. Please help with this problem. I have also tried to subclassing the navigationcontroller and set