Class MediaPatchOptions

java.lang.Object
com.craftmend.openaudiomc.api.media.MediaPatchOptions

public class MediaPatchOptions extends Object
A set of media options that can be updated on the fly for live media streams.
  • Field Details

    • volume

      protected Integer volume
      The volume of the media, 0-100
    • speed

      protected Integer speed
      The speed of the media, 100 by default, but can be used to speed up or slow down the media. 100 = normal speed, 200 = double speed, 50 = half speed, etc.
  • Constructor Details

    • MediaPatchOptions

      public MediaPatchOptions(Integer volume, Integer speed, int fadeTimeMs, String target)
      Creates a new MediaPatchOptions instance.
      Parameters:
      volume - The volume of the media, 0-100
      speed - The speed of the media, 100 by default, but can be used to speed up or slow down the media. 100 = normal speed, 200 = double speed, 50 = half speed, etc.
      fadeTimeMs - Fade time is the amount of milliseconds it takes to fade in or out. 0 by default, but can be used to create smooth transitions between multiple regions, or to create a fade in effect.
      target - Target media ID
    • MediaPatchOptions

      public MediaPatchOptions()
  • Method Details

    • setFadeTimeSeconds

      public void setFadeTimeSeconds(int seconds)
    • setFadeTime

      public void setFadeTime(int ms)
    • validate

      public OptionalError validate()
    • getVolume

      public Integer getVolume()
      The volume of the media, 0-100
    • getSpeed

      public Integer getSpeed()
      The speed of the media, 100 by default, but can be used to speed up or slow down the media. 100 = normal speed, 200 = double speed, 50 = half speed, etc.
    • getFadeTimeMs

      public int getFadeTimeMs()
      Fade time is the amount of milliseconds it takes to fade in or out. 0 by default, but can be used to create smooth transitions between multiple regions, or to create a fade in effect.
    • getTarget

      public String getTarget()
      Target media ID
    • setVolume

      public void setVolume(Integer volume)
      The volume of the media, 0-100
    • setSpeed

      public void setSpeed(Integer speed)
      The speed of the media, 100 by default, but can be used to speed up or slow down the media. 100 = normal speed, 200 = double speed, 50 = half speed, etc.
    • setFadeTimeMs

      public void setFadeTimeMs(int fadeTimeMs)
      Fade time is the amount of milliseconds it takes to fade in or out. 0 by default, but can be used to create smooth transitions between multiple regions, or to create a fade in effect.
    • setTarget

      public void setTarget(String target)
      Target media ID
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object