- AirPlay
- Chromecast + related technologies
Simple Service Discovery Protocol (SSDP) is used to discover services advertised by devices on your network.
- Yell "who's out there?!"
- Listen for responses
Discovery And Launch (DIAL) is a simple protocol that 2nd screen devices can use to launch apps on 1st screen devices. Developed by Netflix and YouTube.
- Find device's DIAL endpoint
- Use it
Incredibly high-tech, Google Spreadsheet powered name registry.
Overview of the DIAL protocol.
UPnP > DIAL > Chromecast
- Send multicast M-SEARCH request with a Search Target (ST) header of
urn:dial-multiscreen-org:service:dial:1
. - Read LOCATION header of responding GET requests.
- GET the LOCATION header and read the APPLICATION-URL header in the response.
- APP-URL is /, where APP-NAME is defined in the registry.
- POST to APP-URL. Include supported parameters in the body of the POST, if necessary.
v=eIej8JgWWJk
is a good demo for YouTube. - Read the LOCATION header of the POST response to get the INSTANCE-URL.
- DELETE to the INSTANCE-URL to stop the running app.
-
Play a video:
{"v": video_id}
-
Play a playlist:
{"listType": "playlist", "list": playlist_id}
Thanks for sharing, this was very useful!
I tried the YouTube JSON parameters as in your example and they don't work, I'm only able to get it working by sending a raw body, for example: v=DYd57rkvnpQ