O'Reilly logo

iOS Programming Cookbook by Hossam Ghareeb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Playing videos

In this section, we will deal with videos instead of audio files. Playing videos is one of the most common tasks in iOS apps to play movies, shows, ads, or even tutorials for your app. We will look at the various ways of playing videos and how can you play a video in the picture in picture mode for iPad multitasking.

Getting ready

We will use some sample video files from http://www.sample-videos.com/, which has a huge list of different sizes, resolutions, and formats of videos that you can use in testing, and all of them are free.

How to do it...

Perform the following steps to add a video:

  1. Let's, as usual, create a new Xcode project with the Single View Application template called PlayingWithVideos.
  2. For the demo app, we have downloaded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required