Package com.opentok

Class AudioConnectorProperties.Builder

    • Constructor Summary

      Constructors 
      Constructor Description
      Builder​(java.lang.String uri)
      Constructor for the AudioConnectorProperties.Builder, using a string to define the WebSocket URI.
      Builder​(java.net.URI uri)
      Constructor for the AudioConnectorProperties.Builder, using a URI to define the WebSocket URI.
    • Constructor Detail

      • Builder

        public Builder​(java.net.URI uri)
        Constructor for the AudioConnectorProperties.Builder, using a URI to define the WebSocket URI.
        Parameters:
        uri - The publicly reachable WebSocket URI to be used for the destination of the audio stream.
      • Builder

        public Builder​(java.lang.String uri)
        Constructor for the AudioConnectorProperties.Builder, using a string to define the WebSocket URI.
        Parameters:
        uri - The publicly reachable WebSocket URI to be used for the destination of the audio stream, as a string (such as "wss://example.com/ws-endpoint").
    • Method Detail

      • addStream

        public AudioConnectorProperties.Builder addStream​(java.lang.String stream)
        Adds an OpenTok stream (with the corresponding stream ID) to include in the WebSocket audio. If the AudioConnectorProperties includes no streams, all streams in the session will be included.
        Parameters:
        stream - The stream ID.
        Returns:
        This builder with the additional stream ID.
      • addStreams

        public AudioConnectorProperties.Builder addStreams​(java.lang.String... streams)
        Adds OpenTok streams (with the corresponding stream IDs) to include in the WebSocket audio. If the AudioConnectorProperties includes no streams, all streams in the session will be included.
        Parameters:
        streams - The stream IDs to add.
        Returns:
        This builder with the additional stream IDs.
      • addStreams

        public AudioConnectorProperties.Builder addStreams​(java.util.Collection<java.lang.String> streams)
        Adds OpenTok streams (with the corresponding stream IDs) to include in the WebSocket audio. If the AudioConnectorProperties includes no streams, all streams in the session will be included.
        Parameters:
        streams - The collection of stream IDs to add.
        Returns:
        This builder with the additional stream IDs.
      • addHeaders

        public AudioConnectorProperties.Builder addHeaders​(java.util.Map<java.lang.String,​java.lang.String> headers)
        Puts all entries of the map into the headers parameter. The headers will be sent to your WebSocket server with each message.
        Parameters:
        headers - The map of header key-value pairs to append.
        Returns:
        This builder with the specified headers included.
      • addHeader

        public AudioConnectorProperties.Builder addHeader​(java.lang.String key,
                                                          java.lang.String value)
        Adds a header entry to this object's headers property. The header will be sent to your WebSocket server with each message.
        Parameters:
        key - Header key.
        value - Header value.
        Returns:
        This builder with the additional header property.