Single App License $29.99

1 application Binary restricted distribution Commercial use allowed Can modify source 6 months support Read full license | More Info

Developer License $59.99

Unlimited projects Source and binary distribution Commercial use allowed Can modify source 1 year support Read full license | More Info

Multiple App License $79.99

5 applications Binary restricted distribution Commercial use allowed Can modify source 6 months support Read full license | More Info

You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

Starting from $ 29.99

View Pricing 14 days money-back guarantee
(3 ratings)

iOS Video View

A UIView for playing or recording a video. The video can be played in a window or full-screen. Includes a demo.

Share and win up to $15k in prizes each month!Learn more

Share

Description

UIVideoView is UIView subclass which creates a view for recording and playing an embedded or full-screen video. Supports switching between embedded and full-screen view both by user and programmer. Can now record and play a video from within view. For iPad, iPhone and iPod Touch.

If you turn on recording, you can record and use a video in the view. Recorded video is automatically saved to your Photos and used by the view. Clicking the play button plays the recorded video.

The video view displays a thumbnail of your choosing overlaid with a play button. You can also use any of 13 new thumbnail images available. Upon playing the video is shown embedded in your video view or full screen in a supplied view controller.

Automatic AirPlay support for use with Apple TV and other AirPlay-enabled devices.

It's tested and works fine on iOS6 but will work on any other version as well.

Back to top

Supported OS & SDK Versions

  • Supported build target - iOS 6.0 / Mac OS 10.7 (Xcode 4.3.1, Apple LLVM compiler 3.1)
  • Earliest supported deployment target - iOS 6.0 / Mac OS 10.6
  • Earliest compatible deployment target - iOS 6.0 / Mac OS 10.6

NOTE: 'Supported' means that the library has been tested with this version. 'Compatible' means that the library should work on this OS version (i.e. it doesn't rely on any unavailable SDK features) but is no longer being tested for compatibility and may require tweaking or bug fixes to run correctly.

Back to top

Installation

To use UIVideoView into your app, drag the UIVideoView.h, UIVideoView.m, *.png and *.png images into your project. Make sure that you indicate to copy the files into your project. Also make sure that the Target Membership is checked UIVideoView.m and .png and .jpg images.

closeVideoPlayer.png is the close icon displayed when playing the embedded video player. You can replace with your own close icon.

newVideo.png is the new icon displayed if the video is set to new (setNew:TRUE). You can replace with your own new icon.

playVideo.png is the play icon displayed in the video view for clicking on to play the video. You can replace with your own play icon.

Frameworks: also make sure you have the MobileCoreServices framework included.

Back to top

Usage

// see Demo Example in Examples/Demo folder for full source code

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];

CGRect rect = [[UIScreen mainScreen] bounds];
screenWidth = rect.size.width;
screenHeight = rect.size.height;

self.view.backgroundColor = [UIColor blueColor];

NSURL * _thumbnailUrl1 = [NSURL URLWithString:@"http://vthumb.ak.fbcdn.net/hvthumb-ak-prn1/574360_10150802315208900_10150802314338900_35608_417_t.jpg"];
NSURL * videoUrl1 = [NSURL URLWithString:@"http://www.youtube.com/embed/lzsBwnv_dAg"];
videoView1 = [[UIVideoView alloc] initWithFrame:CGRectMake(100, 120, screenWidth - 200, 300) parent:self thumbnail:_thumbnailUrl1 video:videoUrl1 fullscreen:FALSE  recording:FALSE autostart:FALSE];
[self.view addSubview:videoView1];    

[videoView1 setNewVideo:TRUE];           // indicate is new video - shows new video icon....

NSURL * _thumbnailUrl2 = [NSURL URLWithString:@"http://vthumb.ak.fbcdn.net/hvthumb-ak-ash4/410431_10150792752283900_10150792746928900_52224_1593_t.jpg"];
NSURL * videoUrl2 = [NSURL URLWithString:@"http://www.youtube.com/embed/RecJ8FZFN58"];
videoView2 = [[UIVideoView alloc] initWithFrame:CGRectMake(100, 500, screenWidth - 200, 300) parent:self thumbnail:_thumbnailUrl2 video:videoUrl2 fullscreen:FALSE  recording:TRUE autostart:FALSE];
[self.view addSubview:videoView2];    

[videoView2 setFullscreen:TRUE];         // switch to fullscreen player
[videoView2 setUseLargePlayButton:TRUE]; // use large play button overlay
[videoView2 setUseRoundCorners:FALSE];   // do not use round corners
[videoView2 setUseRoundCornerRadius:40];  // round corner radius, higher for rounder corners
[videoView2 setThumbnail:UIVideoViewThumbnailVideoProjector];  // set the thumbnail to video projector

// Note: can replace the newVideo.png image file to use your own new video icon
//       can replace the playVideo.png image file to use your own play overlay icon

}

- (void)setThumbnail:(UIVideoViewThumbnail)_thumbnail;

- (UIImage *)getThumbnail:(UIVideoViewThumbnail)_thumbnail;

- (void)setFullscreen:(BOOL)_fullscreen;

- (void)setNewVideo:(BOOL)_newVideo;

- (void)setUseLargePlayButton:(BOOL)_useLargePlayButton;

- (void)setUseRoundCorners:(BOOL)_useRoundCorners;

- (void)setUseRoundCornerRadius:(int)_radius;

- (BOOL)isNewVideo;

- (BOOL)hasCamera;

- (BOOL)recordVideo;

- (BOOL)showVideoPlayer;

- (void)closeVideoPlayer;

- (NSString *)getDeviceType;

- (NSString *)getRealDeviceType;

- (BOOL)isRunningIPad;
Back to top

Example Project Demo

The UIVideoViewDemo example in the Examples/Demo folder demonstrates using UIVideoView.

Read all 5 comments »

Questions & Comments

Leave a comment

You must be logged-in to leave a comment.
Log-in now or register for a free account.
You must be logged-in to vote. Log-in to your account or register now.
View all 2 reviews »

User Reviews

    Despite claiming to be iOS 6 compatible, this component isn't ARC compatible. It also makes use of deprecated calls. Fixing both issues isn't a major difficulty but you shouldn't have to modify something you've paid for just to make it work. Does save a bit of time if you need to integrate an embedded media player but there isn't anything in there that you couldn't figure out for yourself. You need to take a view whether your time is worth more than the purchase price.
    - Kenny Munro, 3 months ago
    Flag review
    Was this helpful? Yes No
  • 1 of 1 people found this review helpful
    not good, it does not add value to mpmovieplayer.
    - G G, 1 year ago
    Flag review
    Was this helpful? Yes No

Starting from $ 29.99

View Pricing 14 days money-back guarantee