Package com.bambuser.broadcaster
Enum TalkbackState
- java.lang.Object
-
- java.lang.Enum<TalkbackState>
-
- com.bambuser.broadcaster.TalkbackState
-
- All Implemented Interfaces:
Serializable
,Comparable<TalkbackState>
public enum TalkbackState extends Enum<TalkbackState>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCEPTED
Talkback stream accepted.IDLE
This is the default state.NEEDS_ACCEPT
This state means that there is a pending talkback request you must approve or reject.PLAYING
TheBroadcaster
is receiving audio, and has signaled to the server that playback has started, so the "caller" knows that there is a live talkback stream to thisBroadcaster
.READY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TalkbackState
valueOf(String name)
Returns the enum constant of this type with the specified name.static TalkbackState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
IDLE
public static final TalkbackState IDLE
This is the default state. There is no pending talkback request and no talkback stream playing. This state requires no action, but is useful for updating any talkback status ui.
-
NEEDS_ACCEPT
public static final TalkbackState NEEDS_ACCEPT
This state means that there is a pending talkback request you must approve or reject.We recommend that you show a dialog asking the end user to plug in headphones, disable any silent mode and press accept or reject.
You must invoke
acceptTalkback(id)
to start receiving the stream, orstopTalkback()
to reject the request and return toIDLE
.
-
ACCEPTED
public static final TalkbackState ACCEPTED
-
READY
public static final TalkbackState READY
Temporary state betweenACCEPTED
andPLAYING
. TheBroadcaster
is now receiving data from the server and it will be playing soon.
-
PLAYING
public static final TalkbackState PLAYING
TheBroadcaster
is receiving audio, and has signaled to the server that playback has started, so the "caller" knows that there is a live talkback stream to thisBroadcaster
.We recommend that you show some small UI that indicates to the end user that there is an ongoing talkback stream. You can also let the end user stop the talkback stream by invoking
stopTalkback()
.
-
-
Method Detail
-
values
public static TalkbackState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TalkbackState c : TalkbackState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TalkbackState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-