Class AudioTrack

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.HashMap<AudioSink,​com.twilio.video.AudioSinkProxy> audioSinks  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addSink​(AudioSink audioSink)
      Adds a sink to the Track.
      java.lang.String getName()
      Returns the audio track name.
      boolean isEnabled()
      Check if this audio track is enabled.
      void removeSink​(AudioSink audioSink)
      Removes a sink from the Track.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • audioSinks

        protected final java.util.HashMap<AudioSink,​com.twilio.video.AudioSinkProxy> audioSinks
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Check if this audio track is enabled.
        Specified by:
        isEnabled in interface Track
        Returns:
        true if track is enabled.
      • getName

        @NonNull
        public java.lang.String getName()
        Returns the audio track name. A pseudo random string is returned if no track name was specified.
        Specified by:
        getName in interface Track
      • addSink

        public void addSink​(@NonNull
                            AudioSink audioSink)
        Adds a sink to the Track. Sinks consume raw audio samples for further processing or storage.
      • removeSink

        public void removeSink​(@NonNull
                               AudioSink audioSink)
        Removes a sink from the Track.
        Parameters:
        audioSink - An object that implements the `AudioSink` interface.