Class ActiveWhen

  • All Implemented Interfaces:
    Serializable, OptionDataListener, org.zkoss.json.JSONAware

    public class ActiveWhen
    extends Optionable
    Define a condition for when a track should be active and not.

    Can either be a function callback or a configuration object.

    If a function is used, it should return a boolean for whether or not the track should be active. The function is called for each audio event, and receives a parameter object with time, and potentially point and value properties depending on the track. point is available if the audio event is related to a data point. value is available if the track is used as a context track, and valueInterval is used.

    Since:
    11.2.0.0
    Author:
    Jamson Chan
    See Also:
    Serialized Form
    • Constructor Detail

      • ActiveWhen

        public ActiveWhen()
    • Method Detail

      • getCrossingDown

        public Number getCrossingDown()
        Returns track is only active when prop was above, and is now at or below this value.

        If both crossingUp and crossingDown are defined, the track is active if either condition is met.

        Default: null

      • setCrossingDown

        public void setCrossingDown​(Number crossingDown)
        Sets track is only active when prop was above, and is now at or below this value.

        If both crossingUp and crossingDown are defined, the track is active if either condition is met.

      • getCrossingUp

        public Number getCrossingUp()
        Returns track is only active when prop was below, and is now at or above this value.

        If both crossingUp and crossingDown are defined, the track is active if either condition is met.

        Default: null

      • setCrossingUp

        public void setCrossingUp​(Number crossingUp)
        Sets track is only active when prop was below, and is now at or above this value.

        If both crossingUp and crossingDown are defined, the track is active if either condition is met.

      • getMax

        public Number getMax()
        Returns track is only active when prop is below or at this value.

        Default: null

      • setMax

        public void setMax​(Number max)
        Sets track is only active when prop is below or at this value.
      • getMin

        public Number getMin()
        Returns track is only active when prop is above or at this value.

        Default: null

      • setMin

        public void setMin​(Number min)
        Sets track is only active when prop is above or at this value.
      • getProp

        public String getProp()
        Returns the point property to compare, for example y or x.

        Default: null

      • setProp

        public void setProp​(String prop)
        Sets the point property to compare, for example y or x.