Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast using Youtube app (DIAL/LoungeAPI) #276

Merged
merged 76 commits into from Feb 19, 2024
Merged

Cast using Youtube app (DIAL/LoungeAPI) #276

merged 76 commits into from Feb 19, 2024

Conversation

iBicha
Copy link
Owner

@iBicha iBicha commented Feb 2, 2024

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.

cast
  • 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.
  • Overall terrible code, needs to be cleaned up

@iBicha iBicha mentioned this pull request Feb 2, 2024
@iBicha iBicha marked this pull request as ready for review February 19, 2024 21:20
@iBicha iBicha merged commit 7d1ba07 into main Feb 19, 2024
1 check passed
@iBicha iBicha deleted the feature/dial-cast-poc branch February 19, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant