Search code examples
androidandroid-youtube-api

Does youtube Android application uses "DIAL" protocol?


I need to develop an application for Set top box, where in any Android mobile youtube application can connect to my youtube application and REMOTEly control STB youtube application. Such as play, pause, navigate..etc

As far as I have searched, youtube uses DIAL for Airplay kind of feature.

But, If I see youtube leanback pairing with mobile; It works on some pairing code; which does not look like DIAL specification.

Are there youtube Android applications, that works on DIAL?


Solution

  • Well, if you have been able to see the pairing code, you've seen the DIAL protocol in action. From there, a proprietary protocol takes over to control the device. (unfortunately, I haven't been able to figure out how it works exactly yet. It somehow proxies all commands through Google via an AJAX-based protocol).

    You probably aren't even supposed to do what you want to do. If you are still trying to get YouTube on the set top box, you might want to look into https://www.youtube.com/tv and leapcast.

    Oh and to clarify, unlike what almost anybody seems to think, DIAL is not like AirPlay. AirPlay streams data to another device, while DIAL just controls another device (the net effect might be the same though). DIAL is more like UPnP, and even uses a subset of UPnP.

    UPDATE

    I have reverse-engineered the protocol. The result is a lightweight audio-only media player acting like a YouTube TV. It can be found on GitHub.

    Under the hood it uses Google's Channel API for near-real-time communication over HTTP without polling.