As of the latest TestFlight beta, Channels now has support for rich deep links.
These allow you to launch the app directly to content, or to even immediatly play it. While the Channels API has been around for a long time to get the app to do things, the beauty of deep links are that they launch the app for you. So they work even if the app is not running.
We should have done this a long time ago.
Why
Deep links are handy in case another app wants to open the app. They're also helpful to use in Siri Shortcuts if for some reason the existing Siri Shortcut Actions aren't enough. They work from browsers, or anywhere else links can be used.
Deep links are just a generally useful thing, because URLs are awesome!
tvOS
You might wonder how this is useful on tvOS, since there's no browser, Shortcuts, or anything else.
Well, if you're a home automation fan, you might have your Apple TV's set up in Home Assistant, or something else. These tools can launch and run deep links for you on your behalf.
This is super useful as it means you can just use deep links to open/play content, vs having to wire up schemes to launch the Channels app first before you can hit the Channels API to do the same thing.
They're just easier.
Deep Links
So what can you do with our deep links, and what do they look like.
The following is some documentation on what is available.
channels://play/recording/23222
Schemes
Deep Link schemes depend on the app version you're targeting.
-
channels://
- Store release -
channels-beta://
- TestFlight beta
Actions
Use identifiers for your content. You can retrieve these either via the Server API or just by inspecting your URLs in your Channels DVR Server web admin.
Recordings
are both episodes or movies or videos. Basically anything you can watch.
Open
These will let you open the content in the app. Nothing will play.
-
/open/show/:id
-
/open/video_group/:id
-
/open/recording/:id
-
/open/episode/:id
-
/open/movie/:id
-
/open/video/:id
-
/open/collection/:id
-
/open/playlist/:id
Play
These will let you play the content directly in the app.
-
/play/channel/:id
-
/play/show/:id
-
/play/video_group/:id
-
/play/recording/:id
-
/play/episode/:id
-
/play/movie/:id
-
/play/video/:id
-
/play/collection/:id
-
/play/playlist/:id
Play Options
Some content supports different optional params for playback.
-
playNext=true
-playlist
,show
,video_group
-
playFirst=true
-collection
,playlist
-
shuffle=true
-collection
,playlist
,shuffle
channels://play/show/2322?shuffle=true
Navigate
This will let you open a section in the app. Use the name of the section as the parameter. Be sure to URL encode the name. This means replace spaces with %20
, i.e. /TV%20Shows
/navigate/:sectionName
OK, have fun with it. Let us know if you run into any issues. Thanks!