libbambuser  0.9.20
Instance Methods | List of all members
<BambuserPlayerDelegate> Protocol Reference

#import <libbambuserplayer.h>

Instance Methods

(void) - videoLoadFail
 
(void) - playbackStarted
 
(void) - playbackPaused
 
(void) - playbackStopped
 
(void) - playbackStatusChanged:
 
(void) - playbackCompleted
 
(void) - durationKnown:
 
(void) - currentViewerCountUpdated:
 
(void) - totalViewerCountUpdated:
 

Detailed Description

The delegate of a BambuserPlayer must adopt the BambuserPlayerDelegate protocol. Optional methods of the protocol allow the delegate to receive signals about the state of playback.

Method Documentation

- (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 an interesting number during a live broadcast.
- (void) durationKnown: (double)  duration
optional

This method will be called when the duration of an archived broadcast is known.

Parameters
durationthe duration of the broadcast(archived).
- (void) playbackCompleted
optional

This method will be called when a broadcast, archived or live, has reached the end.

- (void) playbackPaused
optional

This method will be called when playback of a broadcast is paused.

An archived broadcast or a live broadcast in timeshift mode can be paused by a call to pauseVideo (BambuserPlayer):. An archived broadcast where playback has finished is also considered paused. Live broadcasts can not be paused.

Note
Deprecated use playbackStatusChanged: method instead.
- (void) playbackStarted
optional

This method will be called when playback of a broadcast starts.

Note
Deprecated use playbackStatusChanged: method instead.
- (void) playbackStatusChanged: (enum BambuserPlayerState status
optional

This method will be called when BambuserPlayer.status changes

kBambuserPlayerStateLoading

Metadata for the broadcast is loading. Playback has not started yet.

kBambuserPlayerStatePlaying

Playback has started or continued after kBambuserPlayerStatePaused or kBambuserPlayerStateBuffering

kBambuserPlayerStatePaused

Playback has been paused. This can be done for archived broadcasts or live broadcasts in timeshift mode by a call to pauseVideo (BambuserPlayer):. An archived broadcast where playback has finished is also considered paused. Live broadcasts can not be paused.

kBambuserPlayerStateStopped

Playback has been stopped. A broadcast is stopped either by a call to stopVideo (BambuserPlayer):, a live broadcast has finished or due to an error. After this status has been entered the BambuserPlayer is in a state where it no longer can be used. To start playback again create a new instance of BambuserPlayer.

kBambuserPlayerStateBuffering

BambuserPlayer needs to buffer more data to start or continue playback. When enough data has been buffered and playback continues status changes to kBambuserPlayerStatePlaying.

- (void) playbackStopped
optional

This method will be called when playback of a broadcast is stopped.

A broadcast is stopped either by a call to stopVideo (BambuserPlayer):, a live broadcast has finished or due to an error. After this method has been called the BambuserPlayer is in a state where it no longer can be used. To start playback again create a new instance of BambuserPlayer.

Note
Deprecated use playbackStatusChanged: method instead.
- (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 and is generally a nice number to show for an old broadcast. 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) videoLoadFail
optional

This method will be called when loading of broadcast metadata fails.