Skip to content

biddyweb/AWEasyVideoPlayer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWEasyVideoPlayer

AWEasyVideoPlayer is a simple implementation of AVPlayer mimicking Vine and Instagram.

It supports looping, pausing, playing, muting, and loading states and ships default with no user interface.

Getting Started

Below is an example of adding the video player to a view controller and playing a video.

AWEasyVideoPlayer *videoPlayer = [[AWEasyVideoPlayer alloc] init];
[videoPlayer setFrame:[[self view] bounds]];
[videoPlayer setURL:[NSURL URLWithString:@"URL_HERE"]];
[[self view] addSubview:videoPlayer];

[videoPlayer play];

Features

Looping

[videoPlayer setEndAction:AWEasyVideoPlayerEndActionLoop];

Muting

[videoPlayer setMuted:YES];

Delegate

Set the delegate:

[videoPlayer setDelegate:self];

Receive Error Notices

-(void)videoPlayer:(AWEasyVideoPlayer *)videoPlayer encounteredError:(NSError *)error {

    NSLog(@"Encountered error: %@",[error localizedDescription]);

}

Receive Status Updates

-(void)videoPlayer:(AWEasyVideoPlayer *)videoPlayer changedState:(AWEasyVideoPlayerState)state {

    NSLog(@"Video player state changed: %ld",state);

}

About

Easy Vine and Instagram style video player.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 95.9%
  • Ruby 4.1%