diff options
| author | Brian Jordan | 2012-03-28 13:11:10 -0400 |
|---|---|---|
| committer | Brian Jordan | 2012-03-28 13:11:10 -0400 |
| commit | 6276c3004552d250d0fc22df975b9c29ea1f6884 (patch) | |
| tree | ce4ae9fb7c5d1bd3b99c70e4f88d732d4445316a /Video Tuneup/ViewController.m | |
| parent | b78b2a4a595f604aaaaed72102d662d6f334378f (diff) | |
| download | Video-Tuneup-6276c3004552d250d0fc22df975b9c29ea1f6884.tar.bz2 | |
add play, pause, rewind. Resolves #2
Diffstat (limited to 'Video Tuneup/ViewController.m')
| -rw-r--r-- | Video Tuneup/ViewController.m | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Video Tuneup/ViewController.m b/Video Tuneup/ViewController.m index ca3d92d..b88a8f8 100644 --- a/Video Tuneup/ViewController.m +++ b/Video Tuneup/ViewController.m @@ -14,7 +14,7 @@ static const NSString *ItemStatusContext; @implementation ViewController -@synthesize player, playerItem, playerView, playButton; +@synthesize player, playerItem, playerView, playButton, pauseButton; #pragma mark - Video playback @@ -97,6 +97,14 @@ static const NSString *ItemStatusContext; - (IBAction)play:sender { [player play]; } + +- (IBAction)pause:sender { + [player pause]; +} + +- (IBAction)rewind:sender { + [player seekToTime:kCMTimeZero]; +} - (void)playerItemDidReachEnd:(NSNotification *)notification { [player seekToTime:kCMTimeZero]; |
