From d7e40cd12c7410157618b179befa08befd575a79 Mon Sep 17 00:00:00 2001 From: Chris Talkington Date: Thu, 13 Jan 2022 12:10:09 -0600 Subject: [PATCH] Add content deeplinking support to roku (#21170) --- source/_integrations/roku.markdown | 41 +++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/source/_integrations/roku.markdown b/source/_integrations/roku.markdown index a7194c80bec..737391f582a 100644 --- a/source/_integrations/roku.markdown +++ b/source/_integrations/roku.markdown @@ -98,9 +98,6 @@ The API calls are like this: ```txt GET http://ROKU_IP:8060/query/apps POST http://ROKU_IP:8060/launch/APP_ID - -YouTube example: -POST http://YOUR_ROKU_IP:8060/launch/837?contentID=YOUR_YOUTUBE_VIDEOS_CONTENT_ID&MediaType=live ``` One method of performing the GET request is to open `http://ROKU_IP:8060/query/apps` in your web browser of choice. The Roku will return an XML-formatted list of available channels, including their full name and appID. @@ -130,6 +127,44 @@ action: media_content_type: channel ``` +## Content Deeplinking + +The `media_player.play_media` service may be used to deep link to content within an application. + +| Service data attribute | Optional | Description | Example | +| ---------------------- | -------- | ----------- | ------- | +| `entity_id` | no | Target a specific media player. To target all media players, use `all`. | | +| `media_content_id` | no | A media identifier. | 291097 +| `media_content_type` | no | A media type. | channel +| `extra.content_id` | no | A unique content identifier passed to app. | 8e06a8b7-d667-4e31-939d-f40a6dd78a88 +| `extra.media_type` | no | A media type passed to app. Should be one of `movie`, `episode`, `season`, `series`, `shortFormVideo`, `special`, `live` | movie + +### Example + +```yaml +action: + - service: media_player.play_media + target: + entity_id: media_player.roku + data: + media_content_id: 291097 + media_content_type: app + extra: + content_id: 8e06a8b7-d667-4e31-939d-f40a6dd78a88 + media_type: movie +``` + +### Obtaining Content IDs + +Content IDs are unique to each streaming service and vary in format but are often part of the video webpage URL. Here are some examples: + +| Service | App ID | URL Format | Content ID | Media Type +| ------- | ------ | ---------- | ---------- | ---------- | +| Disney Plus | 291097 | disneyplus.com/video/8e06a8b7-d667-4e31-939d-f40a6dd78a88 | 8e06a8b7-d667-4e31-939d-f40a6dd78a88 | movie +| Hulu | 2285 | hulu.com/series/american-dad-977c8e25-cde0-41b7-80ce-e746f2d2093f | american-dad-977c8e25-cde0-41b7-80ce-e746f2d2093f | series +| Spotify | 22297 | open.spotify.com/playlist/5xddIVAtLrZKtt4YGLM1SQ | spotify:playlist:5xddIVAtLrZKtt4YGLM1SQ | playlist +| YouTube | 837 | youtu.be/6ZMXE5PXPqU | 6ZMXE5PXPqU | live + ## Services ### Service `roku.search`