O'Reilly logo

iPhone JavaScript Cookbook by Arturo Fernandez Montoro

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 a video

This recipe is focused on playing video in our web applications for iOS devices. You'll learn how to display a widget that has the ability to play a video file. We're going to use a video in MPEG-4 format, but other video formats such as H.264 can be used as well.

For our goal, you'll learn two different methods. The first method only uses the HTML5 capabilities of Safari Mobile and the other method requires the Sencha Touch framework.

The code for the HTML5 method can be found at code/ch05/video5/. Regarding the Sencha Touch approach, the code can be found at the code/ch05/video_sencha/ folder in the code bundle provided on the Packtpub site.

Getting ready

For this recipe, you'll need to install the Sencha Touch and the UiUIKit

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