MPMoviePlayerController shows no picture when playing online video - ios

I used a MPMoviePlayerController to play online video in another view controller. It works well most times. But sometimes the player plays video without pictures while the sound and progress bar are working. After the black screen occurs, if I change to play another video, it will often works well. Can someone tell me what's the problem and how can I fix it?

Try to use MPMoviePlayerController to play online video.
It is the best controller for playing online videos.

Related

AVPlayerLayer Vs AVPlayerViewController

I am new to iOS app developing field. I am trying to capture video using AVFoundation. I am successful in this. But when I tried to play the video back using MPMoviePlayerController, I got too many issues. So I am trying to play using AVPlayer.
But in AVPlayer there are two approaches AVPlayerLayer and AVPlayerViewController.
I tried searching about those, but I didn't get any particular reason to choose one.
Can anyone suggest me which is better to use?
AVPlayerViewController is an all in one solution. You setup your AVPlayer with a video and present the player controller. It handles all the playing and has its own controls baked in (I'm sure you've used seen this in other apps). It is the simplest way to show a video.
AVPlayerLayer is for when you want to add some customization, like adding your own controls or extra views, or not making the video full screen.

Play Audio from URL ios

I am developing application like gaana.com
Which player can be used for play mp3 songs from server url ? I want
to implement Play, Pause, Next, Previous buttons And will also play
song list in background mode one by one.
I have already implemented AVPlayer but i getting issue in playing
next audio in background mode. And i had tried all answers regarding
this issue but none of all is working for me.
So i am finding alternative of AVPlayer.

AVPlayer layer not showing video content

I am using multiple AVPlayers to display content on my screen and they are all playing video simultaneously.
The issue is that sometimes the avplayer is playing but the avplayerlayer isn't showing anything- all you get is a blank screen. This happens randomly. I don't even know how to debug this.
Has anyone had these same issues with AVPLayers or AVPlayer layers? Can you reference the same alaasset from different players at the same time? I'm guessing that these
I had this issue when the URL video I was trying to play did not have an extension. After I appended mp4 as path extension, the video started to play in the layer.

Controls disappear when reaching end of audio only title with MPMoviePlayerController

I am using MPMoviePlayerController to play audio and video on an iPad. If an audio only title (an mp3 in this case) is playing and reaches the end the playback controls disappear and there is no way to get them to show again. What I want to have happen is for the controls to stick around and for the title to be scrubbable. I did try setting the repeatMode to MPMovieRepeatModeOne but that seems to have no effect on audio only titles. I did read a post that if you were using MPMoviePlayerViewController to remove the observer for the MPMoviePlayerViewController instance but I am using MPMoviePlayerController. Any ideas would be appreciated.

iPhone: How to play a YouTube video in a certain view (instead of fullscreen)

I found a lots posts about playing mp4 in MPMoviePlayerController (can be in a smaller view in screen) or play youtube video in YTMoviePlayer (fullscreen). I'd like to know if there are someways to play a YouTube video in a certain view? Like apple's example code for MPMoviePlayerController?
https://developer.apple.com/library/ios/#samplecode/MoviePlayer_iPhone/Introduction/Intro.html
Thanks you
You should try this. LBYoutubeView. This allows you to play a video in specific view frame.
If you're using an iPhone, there's no way of using the MPMoviePlayerController other than fullscreen. With the iPad, it's a different story, you can embed the player in another view.

Resources