Inherits from UIViewController
Declared in SCAudioRecorderController.h
SCAudioRecorderController.mm

Overview

Presents the standard C2Call SDK Audio Recorder Controller.

Captures a VoiceMail for submission.

Properties

btnPlay

Play Button.

@property (nonatomic, weak) IBOutlet UIButton *btnPlay

Declared In

SCAudioRecorderController.h

btnRecord

Record Button.

@property (nonatomic, weak) IBOutlet UIButton *btnRecord

Declared In

SCAudioRecorderController.h

btnRecordAgain

Record Again Button.

@property (nonatomic, weak) IBOutlet UIButton *btnRecordAgain

Declared In

SCAudioRecorderController.h

btnSubmit

Submit Button.

@property (nonatomic, weak) IBOutlet UIButton *btnSubmit

Declared In

SCAudioRecorderController.h

editView

EditView shows Play and Record Again Button.

@property (nonatomic, weak) IBOutlet UIView *editView

Declared In

SCAudioRecorderController.h

labelMaxtime

Shows the max. recording Time

@property (nonatomic, weak) IBOutlet UILabel *labelMaxtime

Declared In

SCAudioRecorderController.h

labelTime

Shows the recorded Time.

@property (nonatomic, weak) IBOutlet UILabel *labelTime

Declared In

SCAudioRecorderController.h

levelMeter

Shows Level Meter.

@property (nonatomic, weak) IBOutlet CALevelMeter *levelMeter

Declared In

SCAudioRecorderController.h

messageKey

Rich Media Key of the recorded Message.

@property (nonatomic, strong) NSString *messageKey

Declared In

SCAudioRecorderController.h

progress

Shows recording progress.

@property (nonatomic, weak) IBOutlet UIProgressView *progress

Declared In

SCAudioRecorderController.h

startView

StartView shows Record Button only.

@property (nonatomic, weak) IBOutlet UIView *startView

Declared In

SCAudioRecorderController.h

targetUserid

Targets Userid for Submit.

@property (nonatomic, strong) NSString *targetUserid

Declared In

SCAudioRecorderController.h

Instance Methods

audioPlayerDidFinishPlaying:successfully:

- (void)audioPlayerDidFinishPlaying:(id)player successfully:(id)flag

audioRecorderDidFinishRecording:successfully:

- (void)audioRecorderDidFinishRecording:(id)_recorder successfully:(id)flag

audioRecorderEncodeErrorDidOccur:error:

- (void)audioRecorderEncodeErrorDidOccur:(id)recorder error:(id)error

closeView:

- (IBAction)closeView:(id)sender

dealloc

- (void)dealloc

didReceiveMemoryWarning

- (void)didReceiveMemoryWarning

initAudioPlayer

- (void)initAudioPlayer

initWithNibName:bundle:

- (id)initWithNibName:(id)nibNameOrNil bundle:(id)nibBundleOrNil

playTimer:

- (void)playTimer:(id)t

recordAgain:

Record Again.

- (IBAction)recordAgain:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCAudioRecorderController.h

recordTimer:

- (void)recordTimer:(id)t

setCancelAction:

Sets the Cancel Action. Example:

- (void)setCancelAction:(id)cancelAction

Parameters

cancelAction
  • The Action Block

Discussion

[controller setCancelAction:^(NSString *key) {
    [self.navigationController popViewControllerAnimated:YES];
}];

Declared In

SCAudioRecorderController.h

setSubmitAction:

Sets the Submit Action. Example:

- (void)setSubmitAction:(id)submitAction

Parameters

submitAction
  • The Action Block

Discussion

[controller setSubmitAction:^(NSString *key) {
    [[C2CallPhone currentPhone] submitRichMessage:key message:nil toTarget:targetUser];
    [self.navigationController popViewControllerAnimated:YES];
}];

Declared In

SCAudioRecorderController.h

setupPlaybackSession

- (void)setupPlaybackSession

setupRecordingSession

- (void)setupRecordingSession

stopAll

- (void)stopAll

submitMessage:

Submits the VoiceMail or triggers the Submit Action.

- (IBAction)submitMessage:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCAudioRecorderController.h

togglePlayback:

Start / Stop Playback.

- (IBAction)togglePlayback:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCAudioRecorderController.h

toogleRecording:

Start / Stop Recording.

- (IBAction)toogleRecording:(id)sender

Parameters

sender
  • The initiator of the action

Declared In

SCAudioRecorderController.h

updatePlayTime

- (void)updatePlayTime

updateRecordTime

- (void)updateRecordTime

viewDidAppear:

- (void)viewDidAppear:(id)animated

viewDidLoad

- (void)viewDidLoad

viewDidUnload

- (void)viewDidUnload

viewWillDisappear:

- (void)viewWillDisappear:(id)animated