BambuserBroadcaster, BambuserPlayer  1.0.5
Instance Methods | List of all members
<BambuserViewDelegate> Protocol Reference

#import <BambuserViewDelegate.h>

Instance Methods

(void) - bambuserError:message:
 
(void) - chatMessageReceived:
 
(void) - broadcastStarted
 
(void) - captureInterrupted:
 
(void) - captureInterruptionEnded
 
(void) - broadcastStopped
 
(void) - broadcastDisconnected
 
(void) - broadcastResumed
 
(void) - recordingComplete:
 
(void) - healthUpdated:
 
(void) - currentViewerCountUpdated:
 
(void) - totalViewerCountUpdated:
 
(void) - talkbackRequest:caller:talkbackID:
 
(void) - talkbackStateChanged:
 
(void) - broadcastIdReceived:
 
(void) - snapshotTaken:
 
(void) - uplinkTestComplete:recommendation:
 

Detailed Description

Protocol for a delegate to handle updates and exceptions when using BambuserView.

The delegate of a BambuserView must adopt the BambuserViewDelegate protocol. Optional methods of the protocol allow the delegate to receive signals about the state of broadcasts.

Method Documentation

- (void) bambuserError: (enum BambuserError errorCode
message: (NSString *)  errorMessage 
optional

This method will be called to relay any error to the delegate.

Parameters
errorCodeDefined in BambuserConstants.h
errorMessageUser readable error message, where available
- (void) broadcastDisconnected
optional

This method will be called when the broadcasting process has been disconnected from the remote server, but while still trying to reconnect.

- (void) broadcastIdReceived: (NSString *)  broadcastId
optional

This method is called when the server has returned the unique id given to the broadcast.

- (void) broadcastResumed
optional

This method will be called after broadcastDisconnected, if the BambuserView managed to reconnect and resume broadcasting.

- (void) broadcastStarted
optional

This method will be called when the BambuserView has successfully connected to a Bambuser video server and a broadcast has been started.

- (void) broadcastStopped
optional

This method will be called when the BambuserView has been disconnected from a Bambuser video server and broadcasting has stopped.

- (void) captureInterrupted: (AVCaptureSessionInterruptionReason)  reason
optional

This method will be called when the video capture has been interrupted by an external event. This could e.g. be an incoming phone call, Siri or audio playback from an application allowing background audio. While interrupted the BambuserView has no access to camera nor microphone.

This callback can be used to show a dialog informing that video capture has been interrupted.

Parameters
reasonReason for interrupt.
- (void) captureInterruptionEnded
optional

This method will be called when the video capture is running again after an interruption.

BambuserView will try to continue an interrupted broadcast, if the connection to the Bambuser backend is still available, when an interruption ends. Note! If BambuserView:saveLocally is set to YES a broadcast will always be stopped at an interrupt.

- (void) chatMessageReceived: (NSString *)  message
optional

This method is called every time a chat message is received from the server.

Parameters
messageContains the message
- (void) currentViewerCountUpdated: (int)  viewers
optional

Called when the number of current viewers is updated.

Parameters
viewersNumber of current viewers of the broadcast. This is generally the most interesting number during a live broadcast.
- (void) healthUpdated: (int)  health
optional

During an ongoing broadcast, this method is called whenever the BambuserView's health property is updated.

Parameters
healthContains the stream health value in percents
- (void) recordingComplete: (NSString *)  filename
optional

This method will be called when broadcasting has been stopped and a local copy has been saved.

By default the file is located in the sandbox's NSTemporaryDirectory() and may be removed by the system when your application is not running. It is your responsibility to copy, move, remove or export this file to camera roll.

Parameters
filenameContains the filename of the recorded file
See also
BambuserView::saveLocally
BambuserView::localFilename
- (void) snapshotTaken: (UIImage *)  image
optional

When calling the takeSnapshot method, this method will return the result if successful. The actual dimensions of the snapshot are limited by the active camera resolution, and can vary depending on device. If cropping has been requested using the setOrientation:previewOrientation:withAspect:by: (BambuserView) method, the snapshot will be cropped to the desired aspect ratio.

- (void) talkbackRequest: (NSString *)  request
caller: (NSString *)  caller
talkbackID: (int)  talkbackID 
optional

This method is called when an incoming talkback request is received.

The strings caller and request are set by the caller. The integer talkbackID is unique for this broadcast and request, and is used when accepting a talkback request.

Parameters
requestA free form string set by the caller
callerA string containing the callers name
talkbackIDA unique number associated with this talkback request
- (void) talkbackStateChanged: (enum TalkbackState state
optional

This method is called when talkback status changes.

Parameters
stateDefined in BambuserConstants.h
- (void) totalViewerCountUpdated: (int)  viewers
optional

Called when the total number of viewers is updated.

Parameters
viewersTotal number of viewers of the broadcast. This accumulates over time. The counted viewers are not guaranteed to be unique, but there are measures in place to exclude obvious duplicates, eg. replays from a viewer.
- (void) uplinkTestComplete: (float)  speed
recommendation: (BOOL)  shouldBroadcast 
optional

This method is called when an uplink test has been completed. Uplink speed will be tested automatically when applicationId has been set and a valid broadcast ticket has been retrieved. The supplied speed is bytes per second, -1 if test fails or can't be done. shouldBroadcast is YES if attempting to broadcast is advisable. BambuserView will allow broadcasting regardless of the speed test results. The speed test results are only offered as guidance.