java.lang.Object
org.openhab.core.model.script.actions.Audio

@NonNullByDefault public class Audio extends Object
The static methods of this class are made available as functions in the scripts. This allows a script to use audio features.
Author:
Kai Kreuzer - Initial contribution, Christoph Weitkamp - Added parameter to adjust the volume
  • Constructor Details

    • Audio

      public Audio()
  • Method Details

    • playSound

      public static void playSound(String filename)
    • playSound

      public static void playSound(String filename, PercentType volume)
    • playSound

      public static void playSound(String filename, float volume)
    • playSound

      public static void playSound(String sink, String filename)
    • playSound

      public static void playSound(String sink, String filename, PercentType volume)
    • playSound

      public static void playSound(String sink, String filename, float volume)
    • playStream

      public static void playStream(String url)
    • playStream

      public static void playStream(String sink, String url)
    • getMasterVolume

      public static float getMasterVolume() throws IOException
      Throws:
      IOException
    • setMasterVolume

      public static void setMasterVolume(float volume) throws IOException
      Throws:
      IOException
    • setMasterVolume

      public static void setMasterVolume(PercentType percent) throws IOException
      Throws:
      IOException
    • increaseMasterVolume

      public static void increaseMasterVolume(float percent) throws IOException
      Throws:
      IOException
    • decreaseMasterVolume

      public static void decreaseMasterVolume(float percent) throws IOException
      Throws:
      IOException