From 2098e6d2fe5e80634485c9595c52e08b2c2e0d4a Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 16 Apr 2021 00:34:38 +0200 Subject: [PATCH] Tweaks to Media Source documentation (#17482) --- source/_integrations/media_source.markdown | 32 +++++++++++++++++----- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/source/_integrations/media_source.markdown b/source/_integrations/media_source.markdown index bf6250d31a6..bda91530d17 100644 --- a/source/_integrations/media_source.markdown +++ b/source/_integrations/media_source.markdown @@ -13,7 +13,11 @@ ha_quality_scale: internal The Media Source integration platform allows integrations to expose media for use inside Home Assistant through the Media Browser panel or through supported -media players like Google Cast. This integration is configured automatically +media players like Google Cast. + +## Configuration + +This integration is configured automatically through `default_config` or if another integration implements a media source. If your configuration does not contain any of the above, you can add the below @@ -27,7 +31,7 @@ media_source: ## Local Media By default, the integration looks for media in a specified folder. -If other `media_dirs` are not declared you need to use `/media/local` path for +If other `media_dirs` are not declared you need to use `/media/local` path for example in companion app notification. For Home Assistant OS, Supervised and Container users, this folder is by default @@ -58,23 +62,37 @@ homeassistant: recording: /mnt/recordings ``` +Please note, that the folder must be accessible locally. Home Assistant +cannot connect to external or remote network shares using this configuration +option. + ## Playing media from a Media Source -To play media from a media source via a service call, use the uri scheme `media-source://media_source//`. -Default `media_dir`is `local`. +To play media from a media source via a service call, use the uri +scheme `media-source://media_source//`. +Default `media_dir` is `local`.
-Web browsers and Google Cast media players have very limited video container and codec support. The Media Source integration does not do any transcoding of media, meaning media files must be natively supported by your media player or web browser (for playing in the frontend). If a video file is not supported by your media player or web browser it will fail to play. Please check the documentation of your media player or web browser for lists of supported video formats. +Web browsers and Google Cast media players have very limited video container +and codec support. The Media Source integration does not do any transcoding of +media, meaning media files must be natively supported by your media player or +web browser (for playing in the frontend). + +If a video file is not supported by +your media player or web browser it will fail to play. Please check the +documentation of your media player or web browser for lists +of supported video formats.
Example: + ```yaml service: media_player.play_media target: entity_id: media_player.living_room_tv data: - media_content_type: video/mp4 - media_content_id: media-source://media_source/local/videos/favourites/Epic Sax Guy 10 Hours.mp4 + media_content_type: "video/mp4" + media_content_id: "media-source://media_source/local/videos/favourites/Epic Sax Guy 10 Hours.mp4" ``` [basic-configuration]: /docs/configuration/basic/#media_dirs