Package com.opentok

Class BroadcastProperties.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • maxDuration

        public BroadcastProperties.Builder maxDuration​(int maxDuration)
                                                throws InvalidArgumentException
        Sets the maximum duration, in seconds, of the broadcast. The broadcast will automatically stop when the maximum duration is reached. You can set the maximum duration to a value from 60 (60 seconds) to 36000 (10 hours). The default maximum duration is 2 hours (7200 seconds).
        Parameters:
        maxDuration - The maximum duration in seconds.
        Returns:
        The BroadcastProperties.Builder object with the maxDuration setting.
        Throws:
        InvalidArgumentException
      • hasHls

        public BroadcastProperties.Builder hasHls​(boolean hasHls)
        Call this method to include an HLS broadcast (true) or not false).
        Parameters:
        hasHls - Whether the HLS broadcast is enabled or not.
        Returns:
        The BroadcastProperties.Builder object with the HLS setting.
      • hls

        public BroadcastProperties.Builder hls​(Hls hls)
        Call this method to include HLS options. This will set hasHls to true.
        Parameters:
        hls - The HLS object.
        Returns:
        The BroadcastProperties.Builder object with HLS populated.
      • hasAudio

        public BroadcastProperties.Builder hasAudio​(boolean hasAudio)
        Whether to include audio in the broadcast (true by default).
        Parameters:
        hasAudio - true if audio should be included, false otherwise.
        Returns:
        The BroadcastProperties.Builder object with the hasAudio setting.
      • hasVideo

        public BroadcastProperties.Builder hasVideo​(boolean hasVideo)
        Whether to include video in the broadcast (true by default).
        Parameters:
        hasVideo - true if video should be included, false otherwise.
        Returns:
        The BroadcastProperties.Builder object with the hasVideo setting.
      • resolution

        public BroadcastProperties.Builder resolution​(java.lang.String resolution)
        Sets the resolution of the broadcast stream.
        Parameters:
        resolution - The resolution of the broadcast, either "640x480" (SD, the default), "1280x720" (HD) or "1920x1080" (FHD).
        Returns:
        The BroadcastProperties.Builder object with the resolution setting.
      • multiBroadcastTag

        public BroadcastProperties.Builder multiBroadcastTag​(java.lang.String multiBroadcastTag)
        Set this to support multiple broadcasts for the same session simultaneously. Set this to a unique string for each simultaneous broadcast of an ongoing session. See Simultaneous Broadcasts documentation.
        Parameters:
        multiBroadcastTag - A unique multi-broadcast tag.
        Returns:
        The BroadcastProperties.Builder object with the multiBroadcastTag setting.
      • build

        public BroadcastProperties build()
        Builds the BroadcastProperties object.
        Returns:
        The BroadcastProperties object.