You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: configuration/multimedia.md
+23-8Lines changed: 23 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -13,11 +13,11 @@ The framework supports some base [functions](https://www.eclipse.org/smarthome/d
13
13
14
14
### Actions
15
15
16
-
-`setMasterVolume(float volume)` : Sets the volume of the host machine (volume in range 0-1)
17
-
-`setMasterVolume(PercentType percent)` : Sets the volume of the host machine
18
-
-`increaseMasterVolume(float percent)` : Increases the volume by the given percent
19
-
-`decreaseMasterVolume(float percent)` : Decreases the volume by the given percent
20
-
-`float getMasterVolume()` : Returns the current volume as a float between 0 and 1
16
+
-`setMasterVolume(float volume)` : Sets the volume of the host machine (volume in range 0-1)
17
+
-`setMasterVolume(PercentType percent)` : Sets the volume of the host machine
18
+
-`increaseMasterVolume(float percent)` : Increases the volume by the given percent
19
+
-`decreaseMasterVolume(float percent)` : Decreases the volume by the given percent
20
+
-`float getMasterVolume()` : Returns the current volume as a float between 0 and 1
21
21
22
22
## Audio
23
23
@@ -52,17 +52,32 @@ In order to play a sound, you can use the following command on the console:
52
52
53
53
```text
54
54
openhab> smarthome:audio play doorbell.mp3
55
+
56
+
openhab> smarthome:audio stream example.com
55
57
```
56
58
57
59
### Actions
58
60
59
-
Alternatively the [`playSound()` function](https://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/model/script/actions/Audio.html#playSound-java.lang.String-) can be used in DSL rules:
61
+
Alternatively the [`playSound()`](https://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/model/script/actions/Audio.html#playSound-java.lang.String-) or [`playStream()`](https://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/model/script/actions/Audio.html#playStream-java.lang.String-) functions can be used in DSL rules:
62
+
63
+
-`playSound(String filename)` : plays a sound from the sounds folder to the default sink
64
+
-`playSound(String filename, PercentType volume)` : plays a sound with the given volume from the sounds folder to the default sink
65
+
-`playSound(String sink, String filename)` : plays a sound from the sounds folder to the given sink(s)
66
+
-`playSound(String sink, String filename, PercentType volume)` : plays a sound with the given volume from the sounds folder to the given sink(s)
67
+
68
+
-`playStream(String url)` : plays an audio stream from an url to the default sink (set url to `null` if streaming should be stopped)
69
+
-`playStream(String sink, String url)` : plays an audio stream from an url to the given sink(s) (set url to `null` if streaming should be stopped)
@@ -94,7 +109,7 @@ openhab> smarthome:voice say Hello world!
94
109
95
110
### Actions
96
111
97
-
Alternatively you can execute such commands within DSL rules by using the [`say()` function](https://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/core/voice/VoiceManager.html#say-java.lang.String-):
112
+
Alternatively you can execute such commands within DSL rules by using the [`say()`](https://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/core/voice/VoiceManager.html#say-java.lang.String-) function:
98
113
99
114
```java
100
115
say("Hello world!")
@@ -136,7 +151,7 @@ openhab> smarthome:voice interpret turn on the light
136
151
The default human language interpreter will be used.
137
152
In case of interpretation error, the error message will be said using the default voice and default audio sink.
138
153
139
-
Again, such a command can also be entered within DSL rules (using the [`interpret()` function](https://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/core/voice/VoiceManager.html#interpret-java.lang.String-))
154
+
Again, such a command can also be entered within DSL rules (using the [`interpret()`](https://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/core/voice/VoiceManager.html#interpret-java.lang.String-) function)
0 commit comments