mpmovieplayercontroller

iOS MPMovieplayer controller style issue

拟墨画扇 提交于 2019-12-11 03:09:52
问题 I have create a VideoPlayer/VideoEditor, I can select a video from device memory by using picker view controller. The below image shows how seek bar show when play a video but before choose, It's show a seek bar with correspondent image After Choose a picture i have use with the selected url to MPMoviePlayerController, player = [[MPMoviePlayerController alloc]initWithContentURL:[info objectForKey:@"UIImagePickerControllerMediaURL"]]; player.controlStyle = MPMovieControlStyleEmbedded; But show

MPMoviePlayer standard interface play/pause status reflection issue

半城伤御伤魂 提交于 2019-12-11 02:49:37
问题 One of my components makes heavy use of MPMoviePlayerController and recently showed a weird bug; when using the standard user interface (e.g. MPMoviePlayerController.controlStyle = MPMovieControlStyleFullscreen; ) the player never changes the state of the play/pause button (that thingy in the middle of my screenshot). The functionality stays intact but the player state is not reflected by the UI. When bringing up the controls by tapping on the screen while a movie is playing, I see a play

iOS play video without audio session

こ雲淡風輕ζ 提交于 2019-12-11 02:27:56
问题 I am trying to play a short video in my app using either a MPMoviePlayerController or an AVPlayer . The problem is (since my video doesn't have any sound) that I do not want to interfere with the sounds being played by other apps in the background. I tried to play with AVAudioSession : AVAudioSession *audioSession = [AVAudioSession sharedInstance]; [audioSession setCategory:AVAudioSessionCategoryAmbient withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil]; [audioSession setActive

Adding custom controls to a full screen movie

血红的双手。 提交于 2019-12-11 02:04:00
问题 Is it possible to add custom controls to a movie playing in full-screen mode ( with MPMoviePlayerController )? I've seen this in a few streaming apps, and I'm curious how it is done. 回答1: You can turn off the standard controls of the player and create custom buttons that call play, pause etc on the player. If you set fullscreen to NO, you can make the players frame whatever you want (fullscreen) and layer your custom controls on top. Something like: MPMoviePlayerController *mp = [

Get the current position of a played movie (MPMoviePlayerController currentPlaybackTime doesn't work)

别说谁变了你拦得住时间么 提交于 2019-12-11 01:43:13
问题 hopefully someone has an answer - I am searching now for hours. I want to get the position of an movie. I tried it with MPMoviePlayerController, but this class doesn't support the MPMediaPlayback property called "currentPlaybackTime". (the funny thing is, that the MP Music PlayerController has this property) Therefore I can't get the position in my video. Is there another way to do it??? Thank you very much in advance! 回答1: MPMoviePlayerController conforms to the MPMediaPlayback protocol, and

The server is not correctly configured (-12939)

时光总嘲笑我的痴心妄想 提交于 2019-12-10 22:23:26
问题 Trying to play MP3 from server without first downloading the file locally. Callback for MPMoviePlayerPlaybackDidFinishNotification comes with this: NSConcreteNotification 0x7e1c980 {name = MPMoviePlayerPlaybackDidFinishNotification; object = <ItemMediaPlayer: 0x7856740>; userInfo = { MPMoviePlayerPlaybackDidFinishReasonUserInfoKey = 1; error = "Error Domain=MediaPlayerErrorDomain Code=-12939 \"The server is not correctly configured.\" UserInfo=0x7e243d0 {NSLocalizedDescription=The server is

Show subtitles in a MPMoviePlayerViewController by default

删除回忆录丶 提交于 2019-12-10 19:31:33
问题 Is there any way to show subtitules on a movie loaded by MPMoviePlayerViewController by default?? The movie has subs embed in the video. Thank you! 回答1: Unfortunately this feature is missing in the MPMoviePlayer playback classes. This is obviously rather annoying, and you should consider filing a feature request with Apple. You can use the AVPlayer class instead, which as a .closedCaptionDisplayEnabled property: the downside is it's somewhat more complicated to use and only available on iOS 4

How to play .m3u8 or .ts file in iOS?

人走茶凉 提交于 2019-12-10 19:05:51
问题 I have create one iOS application in xCode 4.5.1 . The main purpose of this applciation is the playing .m3u8 video file. I have add one .m3u8 file with all segment(.ts) in our local resource bundle. So, how to play this file in iPhone locally using MPMoviePlayerController or UIWebView ? And, Can we modify or not this file after the download from the server? If possible then how to do it? pls tell me, any one known... 回答1: You will only be able to play the HLS content if it's being served over

MPMoviePlayerViewController play movie from Documents directory - objective-c

左心房为你撑大大i 提交于 2019-12-10 18:48:38
问题 I have subfolder called "Video" in Documents folder. And there is somevideo.mp4 file. I have full path to this file but MPMoviePlayerViewController doesn't want to play video from local. Here is code: NSString *path = [[self getVideoFolderPath] stringByAppendingPathComponent:@"somevideo.mp4"]; NSURL *fURL = [NSURL fileURLWithPath:path]; MPMoviePlayerViewController *videoPlayerView = [[MPMoviePlayerViewController alloc] initWithContentURL:fURL]; [self presentMoviePlayerViewControllerAnimated

How do I play simultaneous videos on iPhone

↘锁芯ラ 提交于 2019-12-10 15:21:05
问题 Is it possible to play 2 different videos on the same time on the I phone? using MPMoviePlayerViewController , for example? I didn't find any solutions. 回答1: That is not possible. Only one movie/stream can be played at a time when using MPMoviePlayerController / MPMoviePlayerViewController. From MPMoviePlayerController Class Reference Note: Although you may create multiple MPMoviePlayerController objects and present their views in your interface, only one movie player at a time may play its