public class WZBroadcast extends Object
WZBroadcast
class is used to configure and control a live streaming broadcast.Modifier and Type | Field and Description |
---|---|
static boolean |
LOG_STAT_SAMPLES
Set to true to log detailed information about the network performance samples gathered during a broadcast
|
static boolean |
LOG_STAT_SUMMARY
Set to true to log summary information at the end of a broadcast
|
static boolean |
LOG_WOWZ_MESSAGES
Deprecated.
User
setLogLevel(int) instead |
Constructor and Description |
---|
WZBroadcast() |
Modifier and Type | Method and Description |
---|---|
WZStatus |
endBroadcast()
Stop the active live streaming broadcast
|
WZStatus |
endBroadcast(WZStatusCallback statusCallback)
Stop the active live streaming broadcast
|
WZBroadcastConfig |
getBroadcastConfig()
Return the active broadcast configuration
|
WZStreamingStat |
getBroadcastStatistics() |
WZStatus |
getBroadcastStatus()
Deprecated.
use
getStatus() instead |
int |
getLogLevel() |
WZStatus |
getStatus()
Return the active broadcast status
|
WZStatusCallback |
getStatusCallback()
Returns the broadcast status callback
|
boolean |
isABRActivated() |
void |
registerDataEventListener(String eventName,
WZDataEvent.EventListener eventListener)
Register a data event listener to be invoked upon receiving a specified named data event
|
void |
sendDataEvent(WZDataScope eventScope,
String eventName)
Send a data event with the specified scope, name, and parameters
|
void |
sendDataEvent(WZDataScope eventScope,
String eventName,
WZDataEvent.ResultCallback resultCallback)
Send a data event with the specified scope, name, and result callback.
|
void |
sendDataEvent(WZDataScope eventScope,
String eventName,
WZDataMap eventParams)
Send a data event with the specified scope, name, and parameters
|
void |
sendDataEvent(WZDataScope eventScope,
String eventName,
WZDataMap eventParams,
WZDataEvent.ResultCallback resultCallback)
Send a data event with the specified scope, name, parameters, and result callback.
|
void |
sendPingRequest(WZDataEvent.ResultCallback resultCallback)
Sends a ping request to the server and returns the result to the specified callback.
|
void |
setABRActivated(boolean abrActive) |
void |
setLogLevel(int logLevel) |
void |
setStatusCallback(WZStatusCallback statusCallback)
Sets the broadcast status callback
|
WZStatus |
startBroadcast(WZBroadcastConfig broadcastConfig)
Start a live streaming broadcast using the specified configuration
|
WZStatus |
startBroadcast(WZBroadcastConfig broadcastConfig,
WZStatusCallback statusCallback)
Start a live streaming broadcast using the specified configuration
|
void |
unregisterDataEventListener(String eventName,
WZDataEvent.EventListener eventListener)
Unregister a previouslly registered data event listener
|
public static boolean LOG_STAT_SAMPLES
public static boolean LOG_STAT_SUMMARY
public static boolean LOG_WOWZ_MESSAGES
setLogLevel(int)
insteadpublic WZStatus startBroadcast(WZBroadcastConfig broadcastConfig, WZStatusCallback statusCallback)
broadcastConfig
- The configuration settings specified are applied to the SDK's active configuration settings before the broadcast begins.statusCallback
- An instance of the WZStatusCallback
interface which will receive broadcast status informationpublic WZStatus startBroadcast(WZBroadcastConfig broadcastConfig)
broadcastConfig
- The configuration settings specified are applied to the SDK's active configuration settings before the broadcast begins.public WZStatus endBroadcast()
public WZStatus endBroadcast(WZStatusCallback statusCallback)
statusCallback
- An instance of the WZStatusCallback
interface which will receive broadcast status informationpublic WZStreamingStat getBroadcastStatistics()
public boolean isABRActivated()
public void setABRActivated(boolean abrActive)
public WZStatusCallback getStatusCallback()
public void setStatusCallback(WZStatusCallback statusCallback)
statusCallback
- The status callbackpublic void setLogLevel(int logLevel)
public int getLogLevel()
public WZStatus getStatus()
public WZStatus getBroadcastStatus()
getStatus()
insteadpublic WZBroadcastConfig getBroadcastConfig()
public void sendDataEvent(WZDataScope eventScope, String eventName, WZDataMap eventParams, WZDataEvent.ResultCallback resultCallback)
eventScope
- One of WZDataScope.STREAM
or WZDataScope.MODULE
, the scope to which the event applies.
Note that if eventScope
is WZDataScope.STREAM
the resultCallback
parameter must be null
eventName
- The name of the event to sendeventParams
- A name/value pair hash map of the event's parametersresultCallback
- An implementation of the WZDataEvent.ResultCallback
interface
whose WZDataEvent.ResultCallback#onWZDataEventResult
method
will be invoked upon receiving a resulting response from the server.public void sendDataEvent(WZDataScope eventScope, String eventName, WZDataEvent.ResultCallback resultCallback)
eventScope
- One of WZDataScope.STREAM
or WZDataScope.MODULE
, the scope to which the event applies.
Note that if eventScope
is WZDataScope.STREAM
the resultCallback
parameter must be null
eventName
- The name of the event to sendresultCallback
- An implementation of the WZDataEvent.ResultCallback
interface
whose WZDataEvent.ResultCallback#onWZDataEventResult
method
will be invoked upon receiving a resulting response from the server.public void sendDataEvent(WZDataScope eventScope, String eventName, WZDataMap eventParams)
eventScope
- One of WZDataScope.STREAM
or WZDataScope.MODULE
, the scope to which the event applies.eventName
- The name of the event to sendeventParams
- A name/value pair hash map of the event's parameterspublic void sendDataEvent(WZDataScope eventScope, String eventName)
eventScope
- One of WZDataScope.STREAM
or WZDataScope.MODULE
, the scope to which the event applies.eventName
- The name of the eventpublic void registerDataEventListener(String eventName, WZDataEvent.EventListener eventListener)
eventName
- The name of the eventeventListener
- A callback instance to be invoked when the specified event is receivedpublic void unregisterDataEventListener(String eventName, WZDataEvent.EventListener eventListener)
eventName
- The name of the eventeventListener
- A previouslly registered data event listenerpublic void sendPingRequest(WZDataEvent.ResultCallback resultCallback)
responseTime
present in the parameters sent to the resultCallback
resultCallback
- A callback to be invoked with the results of the request. The responseTime
property of the result parameters passed to the callback will contain the response time, in milliseconds.© 2016 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal