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 Details

    • Builder

      public Builder​(java.util.Collection<java.lang.String> 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.
    • Builder

      public Builder​(java.lang.String... 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.
  • Method Details

    • streamUrl

      public StreamAction.Builder streamUrl​(java.util.Collection<java.lang.String> 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.Builder to keep building.
    • streamUrl

      public StreamAction.Builder streamUrl​(java.lang.String... 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.Builder to keep building.
    • level

      public StreamAction.Builder level​(java.lang.Float 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.Builder to keep building.
    • bargeIn

      public StreamAction.Builder bargeIn​(java.lang.Boolean 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.Builder to keep building.
    • loop

      public StreamAction.Builder loop​(java.lang.Integer 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.Builder to keep building.
    • build

      public StreamAction build()
      Returns:
      A new StreamAction object from the stored builder options.