Enum ZegoAudioSourceType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ZegoAudioSourceType>

    public enum ZegoAudioSourceType
    extends java.lang.Enum<ZegoAudioSourceType>
    Audio capture source type.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CUSTOM
      Use custom audio capture, refer to [enableCustomAudioIO] or [setAudioSource].
      DEFAULT
      Default audio capture source (the main channel uses custom audio capture by default; the aux channel uses the same sound as main channel by default).
      MAIN_PUBLISH_CHANNEL
      Using main channel as audio source.
      MEDIA_PLAYER
      Use media player as audio source, only support aux channel.
      MICROPHONE
      Using microphone as audio source.
      NONE
      No audio source.
      SCREEN_CAPTURE
      Using screen capture as audio source.
    • Enum Constant Detail

      • DEFAULT

        public static final ZegoAudioSourceType DEFAULT
        Default audio capture source (the main channel uses custom audio capture by default; the aux channel uses the same sound as main channel by default).
      • CUSTOM

        public static final ZegoAudioSourceType CUSTOM
        Use custom audio capture, refer to [enableCustomAudioIO] or [setAudioSource].
      • MEDIA_PLAYER

        public static final ZegoAudioSourceType MEDIA_PLAYER
        Use media player as audio source, only support aux channel.
      • NONE

        public static final ZegoAudioSourceType NONE
        No audio source. This audio source type can only be used in [setAudioSource] interface, has no effect when used in [enableCustomAudioIO] interface.
      • MICROPHONE

        public static final ZegoAudioSourceType MICROPHONE
        Using microphone as audio source. This audio source type can only be used in [setAudioSource] interface, has no effect when used in [enableCustomAudioIO] interface.
      • MAIN_PUBLISH_CHANNEL

        public static final ZegoAudioSourceType MAIN_PUBLISH_CHANNEL
        Using main channel as audio source. Ineffective when used in main channel. This audio source type can only be used in [setAudioSource] interface, has no effect when used in [enableCustomAudioIO] interface.
      • SCREEN_CAPTURE

        public static final ZegoAudioSourceType SCREEN_CAPTURE
        Using screen capture as audio source. Typically used in mobile screen sharing scenarios. This audio source type can only be used in [setAudioSource] interface, has no effect when used in [enableCustomAudioIO] interface.
    • Method Detail

      • values

        public static ZegoAudioSourceType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ZegoAudioSourceType c : ZegoAudioSourceType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ZegoAudioSourceType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • value

        public int value()
      • getZegoAudioSourceType

        public static ZegoAudioSourceType getZegoAudioSourceType​(int value)