public class WOWZPlayerStatus
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
WOWZPlayerStatus.PlayerState |
Constructor and Description |
---|
WOWZPlayerStatus()
The default constructor.
|
WOWZPlayerStatus(WOWZPlayerStatus.PlayerState state)
Creates and initializes an instance using the specified property values.
|
WOWZPlayerStatus(WOWZPlayerStatus.PlayerState state,
WOWZError error)
Creates and initializes an instance using the specified property values.
|
Modifier and Type | Method and Description |
---|---|
WOWZError |
clearLastError()
Clears the last error property, leaving the state as is.
|
WOWZError |
clearLastError(WOWZPlayerStatus.PlayerState newState)
Clears the value of the last error property and sets the state to the specified value.
|
WOWZError |
getLastError()
Gets the last reported error.
|
WOWZError |
getLastError(boolean clear)
Gets the last reported error and clears the last error property.
|
WOWZPlayerStatus.PlayerState |
getState()
Gets the state property.
|
boolean |
isBuffering()
Checks whether the current state is "buffering."
|
boolean |
isConnecting()
Checks whether the current state is "connecting."
|
boolean |
isIdle()
Checks whether the current state is "idle."
|
boolean |
isPlaying()
Checks whether the current state is "playing."
|
boolean |
isStopping()
Checks whether the current state is "stopping."
|
void |
set(WOWZPlayerStatus.PlayerState state,
WOWZError error)
Updates the property values of this instance with the specified values.
|
void |
set(WOWZPlayerStatus other)
Updates the property values of this instance with the property values from the specified instance.
|
WOWZPlayerStatus.PlayerState |
setAndWaitForState(WOWZPlayerStatus.PlayerState state,
WOWZPlayerStatus.PlayerState desiredState)
Updates the value of the state property and waits for the state to transition to another value.
|
void |
setError(WOWZError other)
Sets the last error property values using the property values from the specified instance.
|
void |
setState(WOWZPlayerStatus.PlayerState state)
Sets the state property.
|
java.lang.String |
toString() |
WOWZPlayerStatus.PlayerState |
waitForState(WOWZPlayerStatus.PlayerState desiredState)
Waits until the value of the state property is equal to the specified value or
WOWZPlayerStatus.PlayerState.IDLE . |
public WOWZPlayerStatus()
public WOWZPlayerStatus(WOWZPlayerStatus.PlayerState state)
state
- The value for state property.public WOWZPlayerStatus(WOWZPlayerStatus.PlayerState state, WOWZError error)
state
- The value for state property.error
- An instance used to initialize the last error property.public WOWZPlayerStatus.PlayerState getState()
public void setState(WOWZPlayerStatus.PlayerState state)
state
- The value for state property.public WOWZError getLastError()
public WOWZError getLastError(boolean clear)
public void setError(WOWZError other)
other
- The instance to use.public WOWZError clearLastError()
public WOWZError clearLastError(WOWZPlayerStatus.PlayerState newState)
newState
- The new state.public void set(WOWZPlayerStatus.PlayerState state, WOWZError error)
state
- The value for state property.error
- An instance used to initialize the last error property.public void set(WOWZPlayerStatus other)
other
- The instance with the property values to use.public WOWZPlayerStatus.PlayerState setAndWaitForState(WOWZPlayerStatus.PlayerState state, WOWZPlayerStatus.PlayerState desiredState)
You might use this method to update the value of the state property which causes an asynchronous task to complete and update the value of the state property itself.
state
- The value for state property.desiredState
- The state property value to wait for.waitForState(PlayerState)
public WOWZPlayerStatus.PlayerState waitForState(WOWZPlayerStatus.PlayerState desiredState)
WOWZPlayerStatus.PlayerState.IDLE
.
You might use this method to wait on an asynchronous task to complete and update the value of the state property.
desiredState
- The state property value to wait for.waitForState(PlayerState)
public boolean isIdle()
WOWZPlayerStatus.PlayerState.IDLE
; false otherwise.public boolean isConnecting()
WOWZPlayerStatus.PlayerState.CONNECTING
; false otherwise.public boolean isPlaying()
WOWZPlayerStatus.PlayerState.PLAYING
; false otherwise.public boolean isStopping()
WOWZPlayerStatus.PlayerState.STOPPING
; false otherwise.public boolean isBuffering()
WOWZPlayerStatus.PlayerState.BUFFERING
; false otherwise.public java.lang.String toString()
toString
in class java.lang.Object
© 2016 - 2019 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal