WOWZBroadcast

Superclass:
NSObject
Declared In:

Introduction

Use the WOWZBroadcast class to configure and control live streaming broadcasts. Typically you only need to directly access this class when you're extending the GoCoder SDK.



Methods

-endBroadcast:
-registerDataSink:eventName:
-sendDataEvent:eventName:params:callback:
-sendPingRequest:
-startBroadcast:statusCallback:
-unregisterDataSink:eventName:

endBroadcast:


- (nonnull WOWZStatus *) endBroadcast:(nullable id<WOWZStatusCallback>)statusCallback; 
Parameters
statusCallback

The callback to be invoked with streaming session status updates and errors.

Return Value

A WOWZStatus object.

Discussion

Ends the active live streaming broadcast.


registerDataSink:eventName:


- (void) registerDataSink:(nonnull id<WOWZDataSink>)sink 
        eventName:(nonnull NSString *)eventName; 
Parameters
sink

An object that conforms to the WOWZAudioEncoderSink protocol.

eventName

The name of the data event the client should listen for.

Discussion

Registers a WOWZDataSink object. WOWZDataSink protocol methods are called when video is being encoded and a data event is received from the server.


sendDataEvent:eventName:params:callback:


- (void) sendDataEvent:(WOWZDataScope)scope eventName:(nonnull NSString *)eventName 
        params:(nonnull WOWZDataMap *)params callback:(nullable WOWZDataCallback)callback; 
Parameters
scope

A WOWZDataScope defining the scope of the event to be sent.

eventName

The name of the event to be sent.

params

The parameters for the event to be sent.

callback

The callback to be invoked with the result of a WOWZDataScopeModule call. Should be nil for WOWZDataScopeStream.

Discussion

Sends user-defined metadata with the current broadcast stream.


sendPingRequest:


- (void) sendPingRequest:(nullable id<WOWZStatusCallback>)statusCallback; 
Parameters
statusCallback

The callback to be invoked with the result of the request. For example, the responseTime property of the result parameters passed to the callback contains the response time, in milliseconds.

Discussion

Sends a ping request to the server and returns the result of the specified callback.


startBroadcast:statusCallback:


- (nonnull WOWZStatus *) startBroadcast:(nonnull WOWZStreamConfig *)config 
        statusCallback:(nullable id<WOWZStatusCallback>)statusCallback; 
Parameters
config

A WOWZStreamConfig that describes the broadcast settings.

statusCallback

The callback to be invoked with streaming session status updates and errors.

Return Value

A WOWZStatus object.

Discussion

Starts a live streaming broadcast using the specified configuration.


unregisterDataSink:eventName:


- (void) unregisterDataSink:(nonnull id<WOWZDataSink>)sink 
        eventName:(nonnull NSString *)eventName; 
Parameters
sink

An object that conforms to the WOWZDataSink protocol.

Discussion

Unregisters a WOWZDataSink object.


Properties

audioDevice
audioEncoder
metaData
status
statusCallback
videoEncoder

audioDevice


@property (nonatomic,
    strong,
    nullable) id<WOWZBroadcastComponent> audioDevice; 
Discussion

The WOWZBroadcastComponent object to use as the audio-capture device for the broadcast session.


audioEncoder


@property (nonatomic,
    strong,
    nullable) id<WOWZBroadcastComponent> audioEncoder; 
Discussion

The WOWZBroadcastComponent object to use as the audio encoder for the broadcast session.


metaData


@property (nonatomic,
    readonly,
    nullable) WOWZDataMap *metaData; 
Discussion

The stream metadata for the broadcasted stream.


status


@property (nonatomic,
    readonly,
    nonnull) WOWZStatus *status; 
Discussion

The status of the broadcast.


statusCallback


@property (nonatomic,
    unsafe_unretained,
    nullable) id<WOWZStatusCallback> statusCallback; 
Discussion

The callback to be invoked with streaming session status updates and errors.


videoEncoder


@property (nonatomic,
    strong,
    nullable) id<WOWZBroadcastComponent> videoEncoder; 
Discussion

The WOWZBroadcastComponent object to use as the video encoder for the broadcast session.