BambuserBroadcaster, BambuserPlayer
1.0.5
|
#import <libbambuser.h>
Instance Methods | |
(id) | - initWithPreset: |
(id) | - initWithPreparePreset: |
(void) | - startCapture |
(void) | - startBroadcasting |
(void) | - stopBroadcasting |
(void) | - displayMessage: |
(BOOL) | - setVideoQualityPreset: |
(void) | - setOrientation:previewOrientation: |
(void) | - setOrientation:previewOrientation:withAspect:by: |
(void) | - setFramerate:minFramerate: |
(void) | - swapCamera |
(void) | - takeSnapshot |
(void) | - acceptTalkbackRequest: |
(void) | - declineTalkbackRequest: |
(void) | - endTalkback |
(void) | - startLinktest |
Properties | |
id | delegate |
Property for setting delegate to receive BambuserViewDelegate callbacks. | |
NSString * | applicationId |
UIView * | chatView |
BOOL | canStart |
enum AudioQuality | audioQualityPreset |
BOOL | saveOnServer |
BOOL | saveLocally |
BOOL | talkback |
BOOL | talkbackMix |
NSString * | localFilename |
BOOL | sendPosition |
NSString * | author |
NSString * | broadcastTitle |
NSString * | customData |
UIInterfaceOrientation | orientation |
UIInterfaceOrientation | previewOrientation |
BOOL | torch |
BOOL | hasLedTorch |
BOOL | hasCurrentCameraLedTorch |
BOOL | hasFrontCamera |
int | health |
enum TalkbackState | talkbackState |
float | zoom |
float | maxZoom |
float | framerate |
float | minFramerate |
float | uplinkSpeed |
BOOL | uplinkRecommendation |
int | maxBroadcastDimension |
CGRect | previewFrame |
AVCaptureDevicePosition | cameraPosition |
BOOL | hasVirtualCamera |
BOOL | isVirtualCamera |
BOOL | virtualCameraEnabled |
float | audioAveragePowerLevel |
float | audioPeakHoldLevel |
BambuserCameraController * | cameraController |
- (void) acceptTalkbackRequest: | (int) | talkbackID |
This method is used to accept a pending talkback request. The talkbackID should previously have been supplied by the delegate protocol method talkbackRequest:caller:talkbackID: (BambuserViewDelegate-p).
talkbackID | The talkbackID supplied in a previous talkback request during ongoing broadcast |
- (void) declineTalkbackRequest: | (int) | talkbackID |
This method is used to reject a pending talkback request. The talkbackID should previously have been supplied by the delegate protocol method talkbackRequest:caller:talkbackID: (BambuserViewDelegate-p).
talkbackID | The talkbackID supplied in a previous talkback request during ongoing broadcast |
- (void) displayMessage: | (NSString *) | message |
- (id) initWithPreparePreset: | (NSString *) | preset |
Used to initialise the bambuserView. This method should be called with one of the kSessionPreset* video preset constants declared in BambuserConstants.h. This method does not start capture immediately, but allows you to set other capture related parameters directly, before starting the capture. If initializing with this method, you must call startCapture immediately afterwards, after setting all the capture related properties.
preset | Preferred kSessionPreset-value from BambuserConstants.h. Default is kSessionPresetAuto. |
- (id) initWithPreset: | (NSString *) | preset |
Used to initialise the bambuserView. This method should be called with one of the kSessionPreset* video preset constants declared in BambuserConstants.h.
preset | Preferred kSessionPreset-value from BambuserConstants.h. Default is kSessionPresetAuto. |
- (void) setFramerate: | (float) | framerate | |
minFramerate: | (float) | minFramerate | |
This method allows setting the minimum framerate of the capture, in addition to the maximum framerate. A minimum framerate different from the maximum framerate is advisable to set at low light conditions. The minimum framerate only affects the capture from the camera itself; the actual streamed framerate may be lower.
Default framerate is 30 fps. Default minFramerate is device dependent.
- (void) setOrientation: | (UIInterfaceOrientation) | orientation | |
previewOrientation: | (UIInterfaceOrientation) | previewOrientation | |
Sets the preview orientation independently from the capture orientation.
The previewOrientation parameter should be the orientation mode used for the application UI where the preview is shown. This allows e.g. keeping the UI locked in one orientation while capturing in an orientation depending on how the device is held.
- (void) setOrientation: | (UIInterfaceOrientation) | orientation | |
previewOrientation: | (UIInterfaceOrientation) | previewOrientation | |
withAspect: | (int) | w | |
by: | (int) | h | |
Sets the preview orientation independently from the capture orientation.
The previewOrientation parameter should be the orientation mode used for the application UI where the preview is shown. This allows e.g. keeping the UI locked in one orientation while capturing in an orientation depending on how the device is held. This method additionally takes integers for width and height, to set aspect ratio for the captured video. Note that the captured video is cropped to fit this ratio, so edges of your preview might not be in the broadcast video. Vice versa, parts not visible in the preview might appear in the broadcast video. To avoid this, make sure to set the preview frame to the same aspect ratio using the previewFrame property.
- (BOOL) setVideoQualityPreset: | (NSString *) | preset |
Sets a video quality preset for the upcoming Bambuser session. This method should not be called during a broadcast.
The only valid value for this parameter is kSessionPresetAuto.
The preset kSessionPresetAuto will allow the video quality to dynamically be adjusted depending on the connection quality.
The default value is kSessionPresetAuto.
Deprecation: Some constants from AVCaptureSession.h were previously used. These are no longer supported.
preset | A video input preset as declared in BambuserConstants.h. |
- (void) startBroadcasting |
- (void) startCapture |
Start capturing with the properties set.
If the initWithPreparePreset: method was called, this method should be called immediately after all properties that are going to be set upfront have been set. This must have been called before calling startBroadcasting.
This method should only be called once.
- (void) startLinktest |
This method is used to manually start a linktest. The result will be returned through the uplinkTestComplete:recommendation: (BambuserViewDelegate-p) method. A valid applicationId must be set before linktests can be performed.
- (void) stopBroadcasting |
- (void) swapCamera |
For devices with front and rear camera this method can be used to toggle between them. This method can be called at any time.
- (void) takeSnapshot |
Request a snapshot be returned from the camera. The resulting UIImage will be returned through the snapshotTaken: (BambuserViewDelegate-p) method.
|
readwritenonatomicretain |
This property should hold your application ID. Depending on serverside setup this ID can redirect you to a suitable ingest server, and automatically set your broadcasting credentials.
This property shall be set before calling startBroadcasting and can not be altered during a broadcast.
|
readnonatomicassign |
A measurement of the instantaneous audio average power level A return value of 0 dB indicates full scale, or maximum power; a return value of -160 dB indicates minimum power (that is, near silence).
|
readnonatomicassign |
A measurement of the peak/hold level of the audio. A return value of 0 dB indicates full scale, or maximum power; a return value of -160 dB indicates minimum power (that is, near silence).
|
readwritenonatomicassign |
This property sets the audio quality preset for the upcoming bambuser broadcast. This setting is locked while local recording is in progress. Constants are defined in BambuserConstants.h for the possible values of this property. The default value is kAudioHigh.
|
readwritenonatomicretain |
Contains the author field which will be associated with the broadcast.
This can be any arbitrary string that should be associated with the broadcast. This property should be set before calling startBroadcasting.
|
readwritenonatomicretain |
|
readnonatomicassign |
Use BambuserCameraController for exposure, focus and white balance settings.
|
readwritenonatomicassign |
Property to set camera used, AVCaptureDevicePositionBack or AVCaptureDevicePositionFront. AVCaptureDevicePositionBack is default. If AVCaptureDevicePositionUnspecified is set it has no effect.
|
readnonatomicassign |
|
readwritenonatomicretain |
|
readwritenonatomicretain |
|
readwritenonatomicassign |
This property allows setting the maximum capture framerate, within a range from 24 to 30 fps. Default framerate is 30.
|
readnonatomicassign |
|
readnonatomicassign |
|
readnonatomicassign |
|
readnonatomicassign |
Returns YES if the device is equipped with more cameras than the standard wide angle camera.
|
readnonatomicassign |
This readonly property returns a value between 0 and 100, indicating the current stream health.
A value of 0 indicates that the connection is unable to keep up with transferring all data currently being generated. A value of 100 indicates that the connection is able to send all the data currently being generated.
This method will return 0 when not broadcasting.
|
readnonatomicassign |
Returns YES if the camera at current cameraPosition is equipped with more cameras than the standard wide angle camera.
|
readwritenonatomicretain |
|
readwritenonatomicassign |
Sets the max size for any dimension (width, height) when using the auto quality preset (kSessionPresetAuto).
This can be used to conserve bandwidth while using a higher camera video resolution, for example when a high resolution local copy is desired.
Accepted values range from 200 to 1280. Default value is 0, which will give the maximum camera resolution. Currently it is 1280x720 in landscape mode and 720x1280 in portrait mode.
The live broadcast resolution will not be higher than the set limit, not higher than the actual camera video resolution and will still be automatically adjusted depending on current network conditions. This method only sets an upper bound.
For instance, if maxBroadcastDimension is set to 640, the broadcast is limited to 640x360 in landscape mode, and to 360x640 in portrait mode at the default aspect ratio.
This property can not be altered during a broadcast.
|
readnonatomicassign |
|
readnonatomicassign |
This property indicates the minimum framerate.
This property is read-only, it can be set via setFramerate:minFramerate:.
|
readwritenonatomicassign |
This property determines the orientation the video will be recorded in.
This property can be set to the UIInterfaceOrientation* constants from UIKit/UIApplication.h. The default value is UIInterfaceOrientationLandscapeRight.
During a broadcast, it can only be set to flipped versions of the same orientation (i.e. switching from UIInterfaceOrientationLandscapeRight to UIInterfaceOrientationLandscapeLeft).
|
readwritenonatomicassign |
|
readnonatomicassign |
This property determines the orientation of the application UI, making sure that the camera picture on the screen is rotated correctly.
This property is read-only - setting the orientation property sets this to the same value. See setOrientation:previewOrientation: in order to change it.
|
readwritenonatomicassign |
When this property is YES, the next broadcast will also be saved to a local file. If a path is set in localFilename, the file gets written in that path, otherwise the file gets a unique filename assigned and is stored within the sandbox's NSTemporaryDirectory(). This property can not be altered during an ongoing broadcast.
|
readwritenonatomicassign |
|
readwritenonatomicassign |
|
readwritenonatomicassign |
|
readwritenonatomicassign |
|
readnonatomicassign |
This readonly property contains the current state of talkback.
See BambuserConstants.h for possible values.
|
readwritenonatomicassign |
|
readnonatomicassign |
|
readnonatomicassign |
|
readwritenonatomicassign |
Property to enable virtual camera. Default value is same as hasVirtualCamera returned value. If hasVirtualCamera returns NO this property can't be set. When virtual camera is enabled BambuserView utilises all available cameras when zooming. The zoom level is set to start from the wide angle camera. That means on devices equipped with ultra wide camera the zoom level is set to 2.0. Set to NO to use only the standard wide angle camera.
|
readwritenonatomicassign |
This property controls the current zoom level. Accepted values are in the range [1.0, maxZoom].