Creating customized MoviePlayer in iPhone & iPad both

Hello All ! You might have seen the application “Livestation” for iPad & iPhone. If you haven’t heard about it, just google once. I am going to demonstrate “How to build the customized user interface for MPMoviePlayerViewController?” Just go through entire steps of this post or watch video tutorials listed below.

1) Create new project named “CustomMediaPlayer” & Import MediaPlayer.framework. ( If you don’t know how to add frameworks in XCode4, please go through this post. Read first step, It gives an idea of adding framework. )

2) Open Application delegate header file & place code as follows.

3) Register a notification for “Media Player did finish playing” on application launch.

4) Place following method in Application delegate method for initialize & terminate movie player.

5) Create a new View controller with XIB interface as follows.

iPad Custom MPMoviePlayerViewController
iPhone Custom MPMoviePlayerViewController

 

Grab the sample code from here.

Make sure to add a video in project. I have not added a video in project ( to compress the size of sourcecode ).

To view complete demonstration just go through following videos once.

4 thoughts on “Creating customized MoviePlayer in iPhone & iPad both

  1. Hi, Mr. Sagar, Thanks for this good tutorial. I am currently learning iOS and have a small project where I want to keep record of played video with their last status and how many time it has been played in media player

    Can you help me on this?

Leave a message