iOS 4.1 black screen before playing video using MPMoviePlayerViewController - ios

My application flow is something like the following
A Video plays.
Once its done. Couple of icons are shown on the screen for users to tap on.
Depending on which icon was tapped, another video starts.
If no icon is tapped for like 5 seconds we automatically go to next video.
The problem is with 3. Just before the video starts a black screen appears for like 0.5 second.
Not sure what's going on because the videos in step 1 and step 4 plays fine.
It will be great if someone can give ideas to debug and fix this.
Thanks!

You can try to put a background-image onto the player with:
[[moviePlayer view] setBackgroundColor:<UIImage>image];

Related

How to play video in line without open up to full screen?

This is my first message app. The tutorial i been watch only teach me how to play the video with full screen. It will be cool if i can play the video without open up to another window or full screen.
i been trying a lot of other stuff but still cant get it to work.
Also now when i playing the video it goes to full screen and the load bar is gonna too. (Xcode 8, iOS 10)
How would modify my code for the video not playing in full screen?

Swift - After performing AVAssetExportSession, if I hit the home button and reopen the app, the video disappears from my AVPlayer and it goes black

If I wait a few seconds and close/reopen the app (or scroll the video), the video eventually comes back. I am completely lost as to why the video just disappears and my AVPlayer goes black.
Has anyone encountered this and/or know of a fix?
Edit: I set up the AVPlayer inside an AVPlayerLayer like so: https://codeshare.io/vmBHX

MPMoviePlayerController play/pause toggle issue

I have used MPMoviePlayerController in my application to play selected video. There is also facility to start video from different location like from 10 min, 20 min, 40 min etc.
Problem in iOS 7:
The problem is when video is played I am able to pause it but it does not resume after pausing. And also the pause button does not turn into play button. After clicking pause button none of the notification like "MPMoviePlayerPlaybackStateDidChangeNotification" get invoked. And same problem occurs when video is playing in fullscreen mode.
Problem in iOS 6:
Here only problem is that pause button does not turn into play button. Here video pause and resume works properly in fullscreenmode also.
one strange behaviour:
For one video when I play it from 40 min it just works perfectly. None of the above issues occur for it. But same video does not work when played from starting or 10,20 min durations.
I have searched a lot but I found only one post here related to this issue. But this solution is not working for me.
Does anybody know how to solve this?
Use AVPlayer as MPMoviePlayer is now deprecated.

Strange issue on ipad

After using my app for sometime.Suddenly, few of the images disappear.Instead, I can see a black screen.Even the wall paper of ipad disappears.Please help!
My screen has image view with some image, next & previous button.Everytime user presses next/previous button audio file plays & image changes.If I am using it for a long time.I cannot see some of the images, while I can hear the audio file
Its because of memory shortage.I fixed this issue by removing various leaks.Hope it helps!

Play video file on splash screen

Can I play a video file in the splash screen?
I use Defualt.png and sleep interval method to use static splash screen. Instead of an image, I want to play a video of about 10 sec.
How can I do that?
Just make Default.png to be the first frame of your video. When the application is loaded, start the video. This is something in between. Hope it helps.
No, the default image is shown by the system while your app is loading, so your code isn't running yet (kinda the whole point). Once it is loaded, you can create a media player and play your video.

Resources