Package com.vonage.client.voice.ncco
Class StreamAction.Builder
java.lang.Object
com.vonage.client.voice.ncco.StreamAction.Builder
- Enclosing class:
- StreamAction
public static class StreamAction.Builder extends java.lang.Object
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description StreamAction.BuilderbargeIn(java.lang.Boolean bargeIn)StreamActionbuild()StreamAction.Builderlevel(java.lang.Float level)StreamAction.Builderloop(java.lang.Integer loop)StreamAction.BuilderstreamUrl(java.lang.String... streamUrl)StreamAction.BuilderstreamUrl(java.util.Collection<java.lang.String> streamUrl)
-
Constructor Details
-
Method Details
-
streamUrl
- Parameters:
streamUrl- An array containing a single URL to an mp3 or wav (16-bit) audio file to stream to the Call or Conversation.- Returns:
- The
StreamAction.Builderto keep building.
-
streamUrl
- Parameters:
streamUrl- An array containing a single URL to an mp3 or wav (16-bit) audio file to stream to the Call or Conversation.- Returns:
- The
StreamAction.Builderto keep building.
-
level
- Parameters:
level- Set the audio level of the stream in the range between -1 and 1 inclusively with a precision of 0.1. The default value is 0.- Returns:
- The
StreamAction.Builderto keep building.
-
bargeIn
- Parameters:
bargeIn- Set to true so this action is terminated when the user presses a button on the keypad. Use this feature to enable users to choose an option without having to listen to the whole message in your Interactive Voice Response (IVR ). If you set bargeIn to true on one more Stream actions then the next action in the NCCO stack must be an input action.The default value is false.
- Returns:
- The
StreamAction.Builderto keep building.
-
loop
- Parameters:
loop- The number of times audio is repeated before the Call is closed. The default value is 1. Set to 0 to loop infinitely.- Returns:
- The
StreamAction.Builderto keep building.
-
build
- Returns:
- A new
StreamActionobject from the stored builder options.
-