MPMoviePlayerController swapping videos flicker - objective-c

I'm using MPMoviePlayerController to play different videos.
However, when I change the video using setContentURL (I'm just targeting OS 3.2 and above), I notice a white flicker.
Is there anyway I can get rid of that flicker and make the transition between videos look smooth?
Thanks,
Tee

Unfortunately not, and I've had this problem too. You could use another instance of the controller, and use an animation to transition from one video to the other, to have a bit more control over the process.

Related

Can watch from watchkit run videos?

Is there any way to run videos on Apple watch using Watchkit within my app? I tried finding any video player, but there was nothing. Thanks!
No - there's currently no way to run video on Apple Watch using Watchkit.
Depending on your desired outcome, you may be interested in the Animation capabilities of WatchKit. By adding a series of images into your Watch App bundle, WatchKit allows you to cycle through them at up to 120 fps or slower when fetching images from iPhone.
You could accomplish some pretty amazing results by animating images, although bare in mind image resources need to be kept to a minimum.
I suggest this tutorial on WatchKit Animation
and this Swift framework for rendering UIViews as image sequences in WatchKit.

Playing a muted video without interrupting background music

My design calls for a video playing in the background of my login screen, exactly like 6snap has.
I would like to avoid the default behavior of stopping the user's music when the video starts to play. My video does not have sound.
I'm using:
<MediaElement Source="MyVideo.mp4" />
I tried setting IsMuted=true which didn't help. Does anyone have an idea how 6snap managed it?
Edit: currently trying the animated gif route. Using the ImageTools 3rd party library and having converted my MP4, it works fine. My 9 second 640x1136 3MB video became a 41MB GIF, so I have to reduce the quality drastically. Still trying to find a better way if possible.
You won't be able to do that with Background Audio and MediaElement, hence as MSDN says:
When a MediaElement control plays audio or video content, any background sounds or media already playing are halted. The app launches the playback experience when the user taps the control. Only one MediaElement control can operate at a time.
It's no matter you have no sound - when you start to play all background sounds/media are halted.
I'm not sure how the App you have mentioned achieved that, but maybe you can try with DirectX/XNA - thought I've not tried this and don't know if that would help.

Simple AVFoundation troubleshooting Situation

I have an app that has some video editing tools. I mix photos and videos and I am running into an odd issue. When i arrange a video composition with a video, then a photo, then back to the video it plays fine until the transition back to the video at which point it freezes! I still hear the audio, and if i seek around the video starts playing again. I dont know how I can error check this! Anyone have any ideas?
The fix more my situation, I created a 1 second clip of blackness and injected that into my composition at the photo spot and now it works fine

start video record on view load in ios

I've looked through the Apple documentation but have seen no mention of how to do this, nevermind if it's even possible or not. I'd like to make it so that an iPhone/iPad begins video recording automatically when a certain view is loaded, and stops and saves when the view is dismissed. Is there any way that I can do this or am I just going to have to use the normal UI for video recording?
Use AVCaptureSession
https://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVCaptureSession_Class/Reference/Reference.html#//apple_ref/occ/cl/AVCaptureSession

Play video as background in iPad App

I have an app and it has a static uimage as the background. To dress up the app, I have a video that would be great as the background but I cannot find any examples of how to play a video as a background view. I have looked at MPMoviePlayerController but I am not sure if it would do what I am expecting.
Anyone have any ideas, or an example of a video as a background to an app?
Thanks
I guess you could just use the MPMoviePlayerController, if you don't do it fullscreen (which is not possible on the iPhone, but it is so on the iPad).
Then you can just put buttons, labels whatever you want on top of that.
Should work fine :)