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 AttributeFeatureVolume
Interface 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 double
getVolume()
This method gets the volume of this object.boolean
isMuted()
default void
mute()
Setsmute
totrue
.void
setMuted(boolean muted)
void
setVolume(double volume)
default void
unmute()
Setsmute
tofalse
.
-
-
-
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 to0
and if greater than1
set to1
.
-
isMuted
boolean isMuted()
- Returns:
true
if muted (audio is suppressed withoutsetting volume
to0
so thevolume
is not lost),false
otherwise.
-
setMuted
void setMuted(boolean muted)
- Parameters:
muted
- the new value ofisMuted()
.
-
mute
default void mute()
Setsmute
totrue
.
-
unmute
default void unmute()
Setsmute
tofalse
.
-
-