Tutorial details

Playing Videos | App Code for Sale | Preview

Playing Videos | iOS Tutorial

How to play video files in your apps

Overview PAGE TOP

Reference: http://www.geekylemon.com/WEBPROTECT-xcodetutorialplayvideo.htm

In this tutorial i will be showing you how to play video files in your apps


  • 1 Round Rect Button
  • 1 Video Files

Playing videos in your application can give so much more information than a standard pages of text take youtube for example users are able to share and express information in a way a written page cannot

ViewController.h PAGE TOP

#import <MediaPlayer/MediaPlayer.h>
@interface ViewController :UIViewController {

ViewController.m PAGE TOP

@implementation ViewController
-(IBAction)playvideo {
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle]
    pathForResource:@"Video1" ofType:@"mp4"]];
MPMoviePlayerViewController *playercontroller = [[MPMoviePlayerViewController alloc] 
    [self presentMoviePlayerViewControllerAnimated:playercontroller];
    playercontroller.moviePlayer.movieSourceType = MPMovieSourceTypeFile;
    [playercontroller.moviePlayer play];
    [playercontroller release];
    playercontroller = nil;

Reference PAGE TOP


0 Comments Leave a comment

Please login in order to leave a comment.

Newest first

to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.