Tweaks to Media Source documentation (#17482)

This commit is contained in:
Franck Nijhof 2021-04-16 00:34:38 +02:00 committed by GitHub
parent 5c6ccba03e
commit 2098e6d2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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/<media_dir>/<path>`.
Default `media_dir`is `local`.
To play media from a media source via a service call, use the uri
scheme `media-source://media_source/<media_dir>/<path>`.
Default `media_dir` is `local`.
<div class="note">
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.
</div>
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