ESPHome  2022.11.3
Data Structures | Enumerations | Functions
esphome::media_player Namespace Reference

Data Structures

class  IsPlayingCondition
 
class  MediaPlayer
 
class  MediaPlayerCall
 
class  MediaPlayerTraits
 
class  PlayMediaAction
 
class  StateTrigger
 
class  VolumeSetAction
 

Enumerations

enum  MediaPlayerState : uint8_t { MEDIA_PLAYER_STATE_NONE = 0, MEDIA_PLAYER_STATE_IDLE = 1, MEDIA_PLAYER_STATE_PLAYING = 2, MEDIA_PLAYER_STATE_PAUSED = 3 }
 
enum  MediaPlayerCommand : uint8_t {
  MEDIA_PLAYER_COMMAND_PLAY = 0, MEDIA_PLAYER_COMMAND_PAUSE = 1, MEDIA_PLAYER_COMMAND_STOP = 2, MEDIA_PLAYER_COMMAND_MUTE = 3,
  MEDIA_PLAYER_COMMAND_UNMUTE = 4, MEDIA_PLAYER_COMMAND_TOGGLE = 5, MEDIA_PLAYER_COMMAND_VOLUME_UP = 6, MEDIA_PLAYER_COMMAND_VOLUME_DOWN = 7
}
 

Functions

 MEDIA_PLAYER_SIMPLE_COMMAND_ACTION (PlayAction, PLAY) MEDIA_PLAYER_SIMPLE_COMMAND_ACTION(PauseAction
 
PAUSE MEDIA_PLAYER_SIMPLE_COMMAND_ACTION (StopAction, STOP) MEDIA_PLAYER_SIMPLE_COMMAND_ACTION(ToggleAction
 
PAUSE TOGGLE MEDIA_PLAYER_SIMPLE_COMMAND_ACTION (VolumeUpAction, VOLUME_UP) MEDIA_PLAYER_SIMPLE_COMMAND_ACTION(VolumeDownAction
 
 MEDIA_PLAYER_SIMPLE_STATE_TRIGGER (IdleTrigger, IDLE) MEDIA_PLAYER_SIMPLE_STATE_TRIGGER(PlayTrigger
 
PLAYING MEDIA_PLAYER_SIMPLE_STATE_TRIGGER (PauseTrigger, PAUSED) template< typename... Ts > class IsIdleCondition
 
const char * media_player_state_to_string (MediaPlayerState state)
 
const char * media_player_command_to_string (MediaPlayerCommand command)
 

Enumeration Type Documentation

◆ MediaPlayerCommand

Enumerator
MEDIA_PLAYER_COMMAND_PLAY 
MEDIA_PLAYER_COMMAND_PAUSE 
MEDIA_PLAYER_COMMAND_STOP 
MEDIA_PLAYER_COMMAND_MUTE 
MEDIA_PLAYER_COMMAND_UNMUTE 
MEDIA_PLAYER_COMMAND_TOGGLE 
MEDIA_PLAYER_COMMAND_VOLUME_UP 
MEDIA_PLAYER_COMMAND_VOLUME_DOWN 

Definition at line 17 of file media_player.h.

◆ MediaPlayerState

Enumerator
MEDIA_PLAYER_STATE_NONE 
MEDIA_PLAYER_STATE_IDLE 
MEDIA_PLAYER_STATE_PLAYING 
MEDIA_PLAYER_STATE_PAUSED 

Definition at line 9 of file media_player.h.

Function Documentation

◆ media_player_command_to_string()

const char * esphome::media_player::media_player_command_to_string ( MediaPlayerCommand  command)

Definition at line 24 of file media_player.cpp.

◆ MEDIA_PLAYER_SIMPLE_COMMAND_ACTION() [1/3]

esphome::media_player::MEDIA_PLAYER_SIMPLE_COMMAND_ACTION ( PlayAction  ,
PLAY   
)

◆ MEDIA_PLAYER_SIMPLE_COMMAND_ACTION() [2/3]

PAUSE esphome::media_player::MEDIA_PLAYER_SIMPLE_COMMAND_ACTION ( StopAction  ,
STOP   
)

◆ MEDIA_PLAYER_SIMPLE_COMMAND_ACTION() [3/3]

PAUSE TOGGLE esphome::media_player::MEDIA_PLAYER_SIMPLE_COMMAND_ACTION ( VolumeUpAction  ,
VOLUME_UP   
)

◆ MEDIA_PLAYER_SIMPLE_STATE_TRIGGER() [1/2]

esphome::media_player::MEDIA_PLAYER_SIMPLE_STATE_TRIGGER ( IdleTrigger  ,
IDLE   
)

◆ MEDIA_PLAYER_SIMPLE_STATE_TRIGGER() [2/2]

PLAYING esphome::media_player::MEDIA_PLAYER_SIMPLE_STATE_TRIGGER ( PauseTrigger  ,
PAUSED   
)

Definition at line 54 of file automation.h.

◆ media_player_state_to_string()

const char * esphome::media_player::media_player_state_to_string ( MediaPlayerState  state)

Definition at line 10 of file media_player.cpp.