Sort 3rd-party players in Google Cast docs (#22215)

This commit is contained in:
Erik Montnemery 2022-04-01 12:16:41 +02:00 committed by GitHub
parent fdcbad7663
commit a64ac92163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,171 +131,6 @@ data:
It's possible to play with other apps than the default media receiver.
To do so, `media_content_type` should be set to `cast`, and `media_content_id` should be a JSON dict with parameters for the app, including the app name.
### BubbleUPNP
The BubbleUPNP app has similar functionality to the built in Default Media Receiver app, and can be used as a backup if the default app fails to play the media.
#### Media parameters
Mandatory:
- `app_name`: `bubbleupnp`
- `media_id`: The URL to play
Optional:
- `media_type`: Media type, e.g. `video/mp4`, `audio/mp3`, `image/jpeg`, defaults to `video/mp4`.
#### Example
```yaml
'cast_bubbleupnp_to_my_chromecast':
alias: "Cast a video to My Chromecast using BubbleUPNP"
sequence:
- target:
entity_id: media_player.my_chromecast
data:
media_content_type: cast
media_content_id: '
{
"app_name": "bubbleupnp",
"media_id": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
"media_type": "video/mp4"
}'
service: media_player.play_media
```
### YouTube
#### Media parameters
Mandatory:
- `app_name`: `youtube`
- `media_id`: YouTube video ID
Optional:
- `enqueue`: Enqueue only
- `playlist_id`: Play video with `media_id` from this playlist. Note that only providing `playlist_id` but no `media_id` does not work.
#### Example
```yaml
'cast_youtube_to_my_chromecast':
alias: "Cast YouTube to My Chromecast"
sequence:
- target:
entity_id: media_player.my_chromecast
data:
media_content_type: cast
media_content_id: '
{
"app_name": "youtube",
"media_id": "dQw4w9WgXcQ"
}'
service: media_player.play_media
```
### [Supla](https://www.supla.fi/)
#### Media parameters
Mandatory:
- `app_name`: `supla`
- `media_id`: Supla item ID
Optional:
- `is_live`: Item is a livestream
#### Example
Example values to cast the item at <https://www.supla.fi/audio/3601824>
```yaml
'cast_supla_to_my_chromecast':
alias: "Cast supla to My Chromecast"
sequence:
- target:
entity_id: media_player.my_chromecast
data:
media_content_type: cast
media_content_id: '
{
"app_name": "supla",
"media_id": "3601824"
}'
service: media_player.play_media
```
### Plex
To cast media directly from a configured Plex server, set the fields [as documented in the Plex integration](/integrations/plex/#service-play_media) and prepend the `media_content_id` with `plex://`:
```yaml
'cast_plex_to_chromecast':
alias: "Cast Plex to Chromecast"
sequence:
- service: media_player.play_media
target:
entity_id: media_player.chromecast
data:
media_content_type: movie
media_content_id: 'plex://{"library_name": "Movies", "title": "Groundhog Day"}'
```
### [BBC Sounds](https://www.bbc.co.uk/sounds)
This app doesn't retrieve its own metadata, so if you want the cast interface or media player card to show titles and/or images you will have to provide the data yourself. See the examples below.
Note: Media ID is NOT the 8 digit alphanumeric in the URL, it can be found by right-clicking the playing audio clip. E.g., [this episode](https://www.bbc.co.uk/sounds/play/p009ycqy) shows:
| | |
| --- | --- |
| 128bps | dash (mf_cloudfront_nonbidi_dash_https) |
| p009ycqz | |
With p009ycqz being the `media_id`
#### Media parameters
Mandatory:
- `app_name`: `bbcsounds`
- `media_id`: Item ID
Optional:
- `is_live`: Item is a live stream
#### Example
Example values to cast [BBC Radio 1](https://www.bbc.co.uk/sounds/play/live:bbc_radio_one)
```yaml
alias: "Cast BBC Sounds to My Chromecast"
sequence:
- service: media_player.play_media
target:
entity_id: media_player.my_chromecast
data:
media_content_type: cast
media_content_id: '
{
"app_name": "bbcsounds",
"media_id": "bbc_radio_one",
"is_live": true
}'
extra:
metadata:
metadataType: 0
title: "Radio 1"
images:
- url: "https://sounds.files.bbci.co.uk/2.3.0/networks/bbc_radio_one/background_1280x720.png"
```
### [BBC iPlayer](https://www.bbc.co.uk/iplayer)
This app doesn't retrieve its own metadata, so if you want the cast interface or media player card to show titles and/or images you will have to provide the data yourself. See the examples below.
@ -346,6 +181,171 @@ Example values to cast [this episode](https://www.bbc.co.uk/iplayer/episode/b09w
- url: "https://ichef.bbci.co.uk/images/ic/1280x720/p07j4m3r.jpg"
```
### [BBC Sounds](https://www.bbc.co.uk/sounds)
This app doesn't retrieve its own metadata, so if you want the cast interface or media player card to show titles and/or images you will have to provide the data yourself. See the examples below.
#### Media parameters
Mandatory:
- `app_name`: `bbcsounds`
- `media_id`: Item ID
Optional:
- `is_live`: Item is a live stream
#### Example
Example values to cast [BBC Radio 1](https://www.bbc.co.uk/sounds/play/live:bbc_radio_one)
```yaml
alias: "Cast BBC Sounds to My Chromecast"
sequence:
- service: media_player.play_media
target:
entity_id: media_player.my_chromecast
data:
media_content_type: cast
media_content_id: '
{
"app_name": "bbcsounds",
"media_id": "bbc_radio_one",
"is_live": true
}'
extra:
metadata:
metadataType: 0
title: "Radio 1"
images:
- url: "https://sounds.files.bbci.co.uk/2.3.0/networks/bbc_radio_one/background_1280x720.png"
```
### BubbleUPNP
The BubbleUPNP app has similar functionality to the built in Default Media Receiver app, and can be used as a backup if the default app fails to play the media.
#### Media parameters
Mandatory:
- `app_name`: `bubbleupnp`
- `media_id`: The URL to play
Optional:
- `media_type`: Media type, e.g. `video/mp4`, `audio/mp3`, `image/jpeg`, defaults to `video/mp4`.
#### Example
```yaml
'cast_bubbleupnp_to_my_chromecast':
alias: "Cast a video to My Chromecast using BubbleUPNP"
sequence:
- target:
entity_id: media_player.my_chromecast
data:
media_content_type: cast
media_content_id: '
{
"app_name": "bubbleupnp",
"media_id": "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
"media_type": "video/mp4"
}'
service: media_player.play_media
```
### Plex
To cast media directly from a configured Plex server, set the fields [as documented in the Plex integration](/integrations/plex/#service-play_media) and prepend the `media_content_id` with `plex://`:
```yaml
'cast_plex_to_chromecast':
alias: "Cast Plex to Chromecast"
sequence:
- service: media_player.play_media
target:
entity_id: media_player.chromecast
data:
media_content_type: movie
media_content_id: 'plex://{"library_name": "Movies", "title": "Groundhog Day"}'
```
### [Supla](https://www.supla.fi/)
Note: Media ID is NOT the 8 digit alphanumeric in the URL, it can be found by right-clicking the playing audio clip. E.g., [this episode](https://www.bbc.co.uk/sounds/play/p009ycqy) shows:
| | |
| --- | --- |
| 128bps | dash (mf_cloudfront_nonbidi_dash_https) |
| p009ycqz | |
With p009ycqz being the `media_id`
#### Media parameters
Mandatory:
- `app_name`: `supla`
- `media_id`: Supla item ID
Optional:
- `is_live`: Item is a livestream
#### Example
Example values to cast the item at <https://www.supla.fi/audio/3601824>
```yaml
'cast_supla_to_my_chromecast':
alias: "Cast supla to My Chromecast"
sequence:
- target:
entity_id: media_player.my_chromecast
data:
media_content_type: cast
media_content_id: '
{
"app_name": "supla",
"media_id": "3601824"
}'
service: media_player.play_media
```
### YouTube
#### Media parameters
Mandatory:
- `app_name`: `youtube`
- `media_id`: YouTube video ID
Optional:
- `enqueue`: Enqueue only
- `playlist_id`: Play video with `media_id` from this playlist. Note that only providing `playlist_id` but no `media_id` does not work.
#### Example
```yaml
'cast_youtube_to_my_chromecast':
alias: "Cast YouTube to My Chromecast"
sequence:
- target:
entity_id: media_player.my_chromecast
data:
media_content_type: cast
media_content_id: '
{
"app_name": "youtube",
"media_id": "dQw4w9WgXcQ"
}'
service: media_player.play_media
```
## Troubleshooting automatic discovery
mDNS relies on UDP multicast, which may fail for various reasons. If none of the tips in this section helps, the recommended solution is to ensure all cast devices have static IPs assigned to them and configure a list of known hosts.