From 3f97ef479320a3d3b0c4cb21d3459024d9cc6ea8 Mon Sep 17 00:00:00 2001 From: "Clifford W. Hansen" Date: Thu, 28 Mar 2019 06:20:24 +0200 Subject: [PATCH] Update entity_media_player.md (#209) Added media_content_type function definition --- docs/entity_media_player.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/entity_media_player.md b/docs/entity_media_player.md index 456b1473..696dc132 100644 --- a/docs/entity_media_player.md +++ b/docs/entity_media_player.md @@ -41,3 +41,26 @@ Optional. Switch the selected input source for the media player. def async_select_source(self, source): """Select input source.""" + +### Mediatype +Required. Returns one of the defined constants from the below list that matches the mediatype + +| CONST | +|-------| +|MEDIA_TYPE_MUSIC| +|MEDIA_TYPE_TVSHOW| +|MEDIA_TYPE_MOVIE| +|MEDIA_TYPE_VIDEO| +|MEDIA_TYPE_EPISODE| +|MEDIA_TYPE_CHANNEL| +|MEDIA_TYPE_PLAYLIST| +|MEDIA_TYPE_IMAGE| +|MEDIA_TYPE_URL| +|MEDIA_TYPE_GAME| + + class MyMediaPlayer(MediaPlayerDevice): + # Implement the following method. + + def media_content_type(self): + """Content type of current playing media.""" +