Inherits from C2ExpandViewController
Declared in SCVideoPlayerController.h

Overview

Presents the standard C2Call SDK Video Player Controller.

Properties

expandCollapseButton

Expand Collapse Button Outlet

@property (nonatomic, strong) IBOutlet UIButton *expandCollapseButton

Declared In

SCVideoPlayerController.h

loadingView

LoadingView Outlet

@property (nonatomic, strong) IBOutlet UIView *loadingView

Declared In

SCVideoPlayerController.h

mediaUrl

Media URL of the Video.

@property (nonatomic, strong) NSURL *mediaUrl

Declared In

SCVideoPlayerController.h

playButton

Toggles playback / stop.

@property (nonatomic, weak) IBOutlet UIButton *playButton

Declared In

SCVideoPlayerController.h

player

Player; see AVPlayer.

@property (nonatomic, strong) AVPlayer *player

Declared In

SCVideoPlayerController.h

playerItem

Player Item; see AVPlayerItem.

@property (nonatomic, strong) AVPlayerItem *playerItem

Declared In

SCVideoPlayerController.h

playerView

SCVideoView; the actual player view.

@property (nonatomic, weak) IBOutlet SCVideoView *playerView

Declared In

SCVideoPlayerController.h

richMessageKey

Rich Media Key of the Video.

@property (nonatomic, strong) NSString *richMessageKey

Declared In

SCVideoPlayerController.h

timeLabel

Timelable Outlet

@property (nonatomic, strong) IBOutlet UILabel *timeLabel

Declared In

SCVideoPlayerController.h

Instance Methods

contentAction:

Shows the default content menu using SCPopupMenu.

- (IBAction)contentAction:(id)sender

Parameters

sender
  • The initiator of the action

Discussion

Default Implementation: SCPopupMenu *cv = [SCPopupMenu popupMenu:self];

if ([[C2CallPhone currentPhone] hasObjectForKey:self.richMessageKey]) {
    [cv addChoiceWithName:NSLocalizedString(@"Forward", @"Choice Title") andSubTitle:NSLocalizedString(@"Share via FriendCaller", @"Choice SubTitle") andIcon:[UIImage imageNamed:@"ico_forward"] andCompletion:^(){
        [self forwardMessage:nil];
    }];

    if ([MFMailComposeViewController canSendMail]) {
        [cv addChoiceWithName:NSLocalizedString(@"Email", @"Choice Title") andSubTitle:NSLocalizedString(@"Share via Email", @"Choice SubTitle") andIcon:[UIImage imageNamed:@"ico_email"] andCompletion:^(){
            [self shareEmail:nil];
        }];
    }

    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
        [cv addChoiceWithName:NSLocalizedString(@"Save", @"Choice Title") andSubTitle:NSLocalizedString(@"Save to your Camera Roll", @"Button") andIcon:[UIImage imageNamed:@"ico_image"] andCompletion:^{
            [self saveToAlbum:nil];
        }];
    }
} else {
    [cv addChoiceWithName:NSLocalizedString(@"Download", @"Choice Title") andSubTitle:NSLocalizedString(@"Download from Server", @"Button") andIcon:[UIImage imageNamed:@"ico_download"] andCompletion:^{
        [[C2CallPhone currentPhone] retrieveObjectForKey:self.richMessageKey];
    }];

}

[cv addCancelWithName:NSLocalizedString(@"Cancel", @"Button") andCompletion:^{

}];
[cv showMenu];

Declared In

SCVideoPlayerController.h

forwardMessage:

Forwards video.

- (IBAction)forwardMessage:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCVideoPlayerController.h

pause:

Pauses video.

- (IBAction)pause:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCVideoPlayerController.h

play:

Plays video.

- (IBAction)play:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCVideoPlayerController.h

saveToAlbum:

Saves video to the photo album.

- (IBAction)saveToAlbum:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCVideoPlayerController.h

shareEmail:

Shares video via email.

- (IBAction)shareEmail:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCVideoPlayerController.h

toEnd:

Jumps to end.

- (IBAction)toEnd:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCVideoPlayerController.h

toStart:

Jumps to start.

- (IBAction)toStart:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCVideoPlayerController.h

toggleControls:

Shows / Hides Player Controls.

- (IBAction)toggleControls:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCVideoPlayerController.h