mirror of
https://github.com/esphome/esphome.git
synced 2025-09-15 17:52:19 +01:00
Add supported formats to media player (#7318)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -1107,6 +1107,19 @@ enum MediaPlayerCommand {
|
||||
MEDIA_PLAYER_COMMAND_MUTE = 3;
|
||||
MEDIA_PLAYER_COMMAND_UNMUTE = 4;
|
||||
}
|
||||
enum MediaPlayerFormatPurpose {
|
||||
MEDIA_PLAYER_FORMAT_PURPOSE_DEFAULT = 0;
|
||||
MEDIA_PLAYER_FORMAT_PURPOSE_ANNOUNCEMENT = 1;
|
||||
}
|
||||
message MediaPlayerSupportedFormat {
|
||||
option (id) = 119;
|
||||
option (ifdef) = "USE_MEDIA_PLAYER";
|
||||
|
||||
string format = 1;
|
||||
uint32 sample_rate = 2;
|
||||
uint32 num_channels = 3;
|
||||
MediaPlayerFormatPurpose purpose = 4;
|
||||
}
|
||||
message ListEntitiesMediaPlayerResponse {
|
||||
option (id) = 63;
|
||||
option (source) = SOURCE_SERVER;
|
||||
@@ -1122,6 +1135,8 @@ message ListEntitiesMediaPlayerResponse {
|
||||
EntityCategory entity_category = 7;
|
||||
|
||||
bool supports_pause = 8;
|
||||
|
||||
repeated MediaPlayerSupportedFormat supported_formats = 9;
|
||||
}
|
||||
message MediaPlayerStateResponse {
|
||||
option (id) = 64;
|
||||
|
Reference in New Issue
Block a user