Class StageVideoConfiguration


  • @RequiresApi(api=28)
    public class StageVideoConfiguration
    extends java.lang.Object
    • Constructor Detail

      • StageVideoConfiguration

        public StageVideoConfiguration()
    • Method Detail

      • setDegradationPreference

        public void setDegradationPreference​(StageVideoConfiguration.DegradationPreference degradationPreference)
        Sets the degradation preference for the publishing video stream. This is ignored when simulcast is enabled.
        Parameters:
        degradationPreference - the desired degradation preference
      • getMaxBitrate

        public int getMaxBitrate()
        Returns:
        The maximum bitrate for the publishing video stream. By default this is 900k.
      • setMaxBitrate

        public void setMaxBitrate​(int maxBitrate)
        Sets the maximum bitrate for the publishing video stream. This value must be between 100k and 2,500k. If the provided bitrate falls outside this range, the bitrate will not be set and an IllegalArgumentException will be thrown.
        Parameters:
        maxBitrate - the desired maximum bitrate
        Throws:
        java.lang.IllegalArgumentException - if bitrate is not valid
      • getMinBitrate

        public int getMinBitrate()
        Returns:
        The minimum bitrate for the publishing video stream. By default this is 100k.
      • setMinBitrate

        public void setMinBitrate​(int minBitrate)
        Sets the minimum bitrate for the publishing video stream. This value must be between 100k and 2,500k, and is only enabled when useMinBitrate is true. If the provided bitrate falls outside this range, the bitrate will not be set and an IllegalArgumentException will be thrown. This is ignored when simulcast is enabled.
        Parameters:
        minBitrate - the desired minimum bitrate
        Throws:
        java.lang.IllegalArgumentException - if bitrate is not valid
      • getTargetFramerate

        public int getTargetFramerate()
        Returns:
        The target framerate of the publishing video stream. By default this is 15.
      • setTargetFramerate

        public void setTargetFramerate​(int targetFramerate)
        Sets the target framerate of the publishing video stream. The target framerate must be between 10 and 30. If the provided frame rate is outside of this range, the framerate will not be set and an IllegalArgumentException will be thrown.
        Parameters:
        targetFramerate - the desired target framerate
        Throws:
        java.lang.IllegalArgumentException - if target framerate is not valid
      • getSize

        public BroadcastConfiguration.Vec2 getSize()
        Returns:
        The resolution of the publishing video stream. By default this is 360x640.
      • setSize

        public void setSize​(BroadcastConfiguration.Vec2 size)
        Sets the resolution of the publishing video stream. The width and height must both be within 160 and 1280, and the maximum total number of pixels is 921,600. So the smallest size you can provide is 160x160, and the largest is either 720x1280 or 1280x720. If the provided resolution does not meet this criteria, the resolution will not be set and an IllegalArgumentException will be thrown.
        Parameters:
        size - the desired resolution
        Throws:
        java.lang.IllegalArgumentException - if resolution is not valid
      • isUsingMinBitrate

        public boolean isUsingMinBitrate()
        Returns:
        Whether we are using the minBitrate.
      • useMinBitrate

        public void useMinBitrate​(boolean useMinBitrate)
        Determines whether we should use minBitrate.
        Parameters:
        useMinBitrate - whether to use minBitrate