Module io.github.mmm.ui.api.core
Package io.github.mmm.ui.api.attribute
Interface AttributeFeatureVolume
-
- All Known Subinterfaces:
AttributeFeatureMedia,UiAudioPlayer,UiMediaPlayer,UiMediaWidget,UiVideoPlayer
- All Known Implementing Classes:
FxMediaPlayer,FxMediaWidget
public interface AttributeFeatureVolumeInterface to read and write attributes of a media player.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description doublegetVolume()This method gets the volume of this object.booleanisMuted()default voidmute()Setsmutetotrue.voidsetMuted(boolean muted)voidsetVolume(double volume)default voidunmute()Setsmutetofalse.
-
-
-
Method Detail
-
getVolume
double getVolume()
This method gets the volume of this object. Please note that the actual volume might be influenced by the mixer of the operating system. This is just a relative scale to the system volume.- Returns:
- the volume in the range from
0.0(mute) to1.0(maximum). - See Also:
isMuted()
-
setVolume
void setVolume(double volume)
- Parameters:
volume- is the new value ofgetVolume(). If negative, set to0and if greater than1set to1.
-
isMuted
boolean isMuted()
- Returns:
trueif muted (audio is suppressed withoutsetting volumeto0so thevolumeis not lost),falseotherwise.
-
setMuted
void setMuted(boolean muted)
- Parameters:
muted- the new value ofisMuted().
-
mute
default void mute()
Setsmutetotrue.
-
unmute
default void unmute()
Setsmutetofalse.
-
-