This is a proof of concept to investigate the feasibility of casting from the regular Youtube app (Android/iOS) to Playlet. It's doable, and has lots of value in removing friction with using the regular YouTube account/app.
Implemented a DIAL server that listens for SSDP messages and responds with DIAL capabilities of the device
This is separate from Roku's built-in implementation
This avoid interfering with the official YouTube app and its DIAL identifier
Can customize device name on the cast dialog (e.g. we can show Playlet on ${DEVICE_NAME})
Serve DIAL files describing the device and the app
Lounge API integration (creating a session, etc)
Bind with RPC endpoint, where we continuously listen for commands
Link with TV code with UI implemented
Gotchas
roUrlTransfer doesn't seem to do long polling / chunked transfer, so this needs to be done using raw sockets
Done, needs cleanup, error handling, etc
There are a lot of commands to handle
Some changes need to be done in the app (e.g the PlayQueue)
The way it is implemented is by adding the loungeToken to the DIAL .xml file. The new way is apparently to have a "passiveSession". This way a lounge doesn't need to be created until the first device connects.
This is a proof of concept to investigate the feasibility of casting from the regular Youtube app (Android/iOS) to Playlet. It's doable, and has lots of value in removing friction with using the regular YouTube account/app.
Playlet on ${DEVICE_NAME}
)Gotchas
roUrlTransfer
doesn't seem to do long polling / chunked transfer, so this needs to be done using raw sockets