WZBroadcast
IntroductionThe WZBroadcast class is used to configure and control a live streaming broadcast. Under normal circumstances, you do not need to access this class directly unless you are extending the GoCoder SDK. Methods
endBroadcast:- (nonnull WZStatus *) endBroadcast:(nullable id<WZStatusCallback>)statusCallback; ParametersReturn ValueA WZStatus object DiscussionStop the active live streaming broadcast registerDataSink:eventName:- (void) registerDataSink:(nonnull id<WZDataSink>)sink eventName:(nonnull NSString *)eventName; ParametersDiscussionRegisters an object that conforms to the WZDataSink protocol. The WZDataSink protocol methods will be called when video encoding is active and a data event is received from the server. sendDataEvent:eventName:params:callback:- (void) sendDataEvent:(WZDataScope)scope eventName:(nonnull NSString *)eventName params:(nonnull WZDataMap *)params callback:(nullable WZDataCallback)callback; ParametersDiscussionSend user-defined metadata within the current broadcast stream. startBroadcast:statusCallback:- (nonnull WZStatus *) startBroadcast:(nonnull WZStreamConfig *)config statusCallback:(nullable id<WZStatusCallback>)statusCallback; ParametersReturn ValueA WZStatus object DiscussionStart a live streaming broadcast using the specified configuration unregisterDataSink:eventName:- (void) unregisterDataSink:(nonnull id<WZDataSink>)sink eventName:(nonnull NSString *)eventName; ParametersDiscussionUnregisters an object that conforms to the WZDataSink protocol. PropertiesaudioDevice@property (nonatomic, strong, nullable) id<WZBroadcastComponent> audioDevice; DiscussionAn object that adopts the WZBroadcastComponent protocol that will be used as the audio capture device for this broadcast session. audioEncoder@property (nonatomic, strong, nullable) id<WZBroadcastComponent> audioEncoder; DiscussionAn object that adopts the WZBroadcastComponent protocol that will be used as the audio encoder for this broadcast session. metaData@property (nonatomic, readonly, nullable) WZDataMap *metaData; DiscussionThe stream metadata for the broadcasted stream status@property (nonatomic, readonly, nonnull) WZStatus *status; DiscussionThe status of the broadcast statusCallback@property (nonatomic, unsafe_unretained, nullable) id<WZStatusCallback> statusCallback; DiscussionA callback that will be invoked with streaming session status updates and errors. videoEncoder@property (nonatomic, strong, nullable) id<WZBroadcastComponent> videoEncoder; DiscussionAn object that adopts the WZBroadcastComponent protocol that will be used as the video encoder for this broadcast session. |