Auto video in iphone? - ios

Anyone know how to add the auto playing video background in iOS? I am guessing its actually images? But the video lasts for 15 seconds so if its images then at 24fps minimum that is a lot of images.
I tried using the UIImageView swapping of images, but it seems like a hack way to do this.
See Uber's app and I think Airbnb has it also.

You can make them images as you guessed, or play video using either MPMoviePlayerController or AvPlayer. Just add any as a subview to your view and make it play at viewWillAppear. I used AvPlayer as the app home screen background before and it worked perfectly.

Related

Add scroll playback controls to AVPlayer like in Photos app

I'm creating AVPlayer view to watch the stream from CCTV. And I want to make playback controls in a video like in Photos app at iPhone(open Photos, play some video, at the bottom, it will be UIScrollView with some screenshots of your video) like at image below.
May I ask you some help on how to create something like this?
And this is my first question here, so sorry if something wrong. =)
ScrollView playback
AVPlayer cannot do this for streaming. The suggestion made on snapshots would also not be close to your want of getting the same behaviour as on local preview of videos in the Photos App on iOS.
If you are looking for this kind of experience I would recommend heading over to movi.ai to get your hands on our cross platform solution with this ready out of the box.

iOS placing and synchronizing frame by frame images over a video playing with AVPlayer

I'm trying to place an image over a video that is playing. There could be a face in the video and I want to plae a custom image over that face. I've tried to play the video using AVPlayer and tried to place the custom image using a scheduled NSTimer. It works good (not perfect) with the simulator. But When I tried it in couple of different devices it does not working well or same in all the devices. Seems like there should be some sort of synchronization to sync the video frame and the custom image.
Can anyone help me out of this issue with any tips or suggestion? Anything that is helpful will be appreciated. :)
Thanks in advance.

Play M4V in background IOS

I'm trying to figure out if it's possible to play an m4v file in the background with buttons that overlay ontop of the video? The video is basically an animation (no sound) but I need to be able to add additional navigation on top of the animation to bring in other calls in the app.
Is that possible to do? If so what is the call that would be required? I've tried hunting around but can't find an answer yet
You can use MPMoviePlayerController, set control style to none, and put your own buttons on top of it.
http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html

How do i animate with a big sprite in ios?

I have to make an animated infographic in iOS. Its consists of about 140 images all 900x700 large. Whats the best approach to do this? I tried CALayerwith indivual images, and also a spritesheet. But it just takes way too long to load and the playback is awful. I also have the animation in a video file, but it needs to be added to a view in a set frame and not be played in full screen.
Try and play the animation video using MPMoviePlayerController. You can play it in a view with custom frame. You can refer the link for sample code too.

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