Interface AccessoryWithCurrentMediaState
-
public interface AccessoryWithCurrentMediaStateAccessory with current media state characteristicCurrentMediaStateCharacteristic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<CurrentMediaStateEnum>getCurrentMediaState()Retrieves the current media state (seeCurrentMediaStateEnumfor supported values).voidsubscribeCurrentMediaState(HomekitCharacteristicChangeCallback callback)Subscribes to changes in the current media state.voidunsubscribeCurrentMediaState()Unsubscribes from changes in the current media state.
-
-
-
Method Detail
-
getCurrentMediaState
java.util.concurrent.CompletableFuture<CurrentMediaStateEnum> getCurrentMediaState()
Retrieves the current media state (seeCurrentMediaStateEnumfor supported values).- Returns:
- a future that will contain the current media state
-
subscribeCurrentMediaState
void subscribeCurrentMediaState(HomekitCharacteristicChangeCallback callback)
Subscribes to changes in the current media state.- Parameters:
callback- the function to call when the current media state changes.
-
unsubscribeCurrentMediaState
void unsubscribeCurrentMediaState()
Unsubscribes from changes in the current media state.
-
-