BETA: Deep Links on iOS and tvOS

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!

4 Likes

Please provide an example

The whole post is full of examples documenting every deep link available.

1 Like

How is the app to launch identified? where can we find the show ID?

It sounds like you're not familiar with links or deep links in the first place. Def google it to learn how they work. They're just links that open the app.

How to find the identifiers is explained in the original post. Use your web admin and you'll see the IDs in the URLs when you visit content.

This looks to be absolutely amazing and my head is spinning with new ideas! That said, I’ve got it working kinks a champ with the exception of tvOS. Is there a way to integrate these tvOS deep links using either Siri Shortcuts or something like Homebridge as I’m not currently using Home Assistant.

Thanks again, looks like I will be loosing more sleep… :grinning:

Typo? recordings vs. recording ?

1 Like

Yep, that was the issue so I changed my post above. Any suggestions as to tvOS and deep links other than using Home Assistant?

Thanks again :grinning:

Yes.

No, because there’s no official way to execute a link remotely on tvOS. They don’t do anything Siri Shortcuts can’t do though. Just use those.

Makes sense, thanks…

One last question, is it possible to use a deep link to open Channels to a particular video group name? In my case, I have a video group named YouTube…

Yes, the /open/show link is interchangeable with TV Shows and Video Groups.

But I'll specifically add it to be clear.

As of the latest TestFlight beta, more content types were added for deep links. The documentation was updated in the original post.

For the additional video types (Episode, Video, Movie), while these were added for clarity, they're really interchangeable. Everything is a recording.

2 Likes

I can’t seem to get this one right. I’ve tried several combinations. Any thoughts?

channels-beta://open/video_group/videos-24e6654bfd1ab85bebb1f721a4be46e6fdb9ea8974d14442d3aaecd1f971fcbb

1 Like

Whoops, the last build that went out didn't have the changes. It's going out now.

OK, the latest release has the actual changes.

2 Likes

Now it’s working great! Thank you so very much. :grinning:

Is there a way to open a specific live TV channel on tvOS via a deep link, maybe through On Now? My goal is to start playing a specific live TV channel (via TVE), and I'm currently doing it on my AndroidTV box using a YouTubeTV deep link (like youtubetv://watch/7zPKP5_GZOo). Unfortunately, the tvOS YouTubeTV app doesn't appear to support deeplinking (even though the iOS app does :shrug:), so I'm wondering if I can do it through Channels. It looks like the examples above are focused on local content and not playing live content.

3 Likes

Ahh jeez, I left that one off the list in the original post. Of course you can deep link into a channel with Channels :rofl: :rofl: :rofl:

I've added it to the list of them.

3 Likes

This is awesome! I’ve got a family member who can’t use the AppleTV remote and I wanted a way to set up one-touch shortcuts on an iPad to tune certain channels.

I found an app called Deeplink over on the Shortcuts Reddit, it’s pretty easy to set up a shortcut using these deep links.

With HDMI-CEC, it even turns on the TV if it’s off.

1 Like