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

Casting / Lounge API issues #310

Open
2 of 10 tasks
iBicha opened this issue Feb 26, 2024 · 0 comments
Open
2 of 10 tasks

Casting / Lounge API issues #310

iBicha opened this issue Feb 26, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@iBicha
Copy link
Owner

iBicha commented Feb 26, 2024

The integration with Cast from YouTube has many issues and limitations, that I decided to group them into one ticket to classify them. If you notice issues related to the Casting functionality, comment on this issue.

  • 1. YouTube mobile app overrides the current queue and screw up the currently playing video
  • 2. Changing the volume on the app does not change it in Playlet
  • 3. Voice search from the YouTube mobile app does not work
  • 4. "Remote" (D-pad buttons) do not work
  • 5. Duplicate "Playlet on Roku" devices in the Cast to dialog
  • 6. Toggling and/or changing the Captions language from the phone does not work
  • 7. Can't play next video (auto play) if we're currently playing the last video in the queue
  • 8. Changing the queue from Playlet or web app does not reflect in YouTube mobile app
  • 9. Unknown SID spammed error
  • 10. Changing window size in the browser restarts video on Playlet

1. YouTube mobile app overrides the current queue and screw up the currently playing video

To reproduce:

  1. Start Playlet
  2. Play a playlist (e.g. a playlist with 50 videos, and playing video n 3)
  3. Connect from YouTube mobile app
  4. Add a video to queue
  5. Now the list is overridden (the queue now contains only 2 videos) and the index is wrong (it shows Queue (3/2))

2. Changing the volume on the app does not change it in Playlet

This is a Roku OS limitation. Playlet can't control the volume. But it can mute the video. In this case, if the volume is set to 0, Playlet mutes the video. Any other value, Playlet unmutes. This is considered solved, as there isn't much more to do about it.

3. Voice search from the YouTube mobile app does not work

Playlet currently ignore voice search commands. This is doable, it was simply not implemented yet.

4. "Remote" (D-pad buttons) do not work

Sending remote button presses from Playlet itself to itself is not possible. This means in order to make this feature work, all button handling logic must be rewritten for the entire app. It's doable, just not planned yet.

5. Duplicate "Playlet on Roku" devices in the Cast to dialog

This can happen when you link to Playlet using the Link with TV code option, and then disconnect, restart Playlet and open the cast dialog on the Phone. Playlet changes its device identifier after each restart (for privacy reasons) so YouTube can mistake these different IDs for different devices. Playlet tries to send a "disconnect" signal to make sure devices don't get stuck, but they take longer when you use the Link with TV code option. Either way, these duplicate entires expire after a while (and they disappear when you can't connect to them)

6. Toggling and/or changing the Captions language from the phone does not work

This is simply not implemented yet.

7. Can't play next video (auto play) if we're currently playing the last video in the queue

If we are playing the next video in the queue, the "next" button on the phone should be enabled (if autoplay setting is enabled) and allow us to play the next related video. This is currently not properly implemented.

8. Changing the queue from Playlet or web app does not reflect in YouTube mobile app

You can add to queue from Playlet or from web app, or even clear the queue entirely. The changes will not be propagated to the YouTube mobile app, but cause we're not sending any messages related to these events.

9. Unknown SID spammed error

In some cases the session id gets invalidated. In this case, the long polling keeps getting a 400 error

[ERROR][LongPoller.bs:193] Http status code: 400
[ERROR][LongPoller.bs:194] Response data: HTTP/1.1 400 Unknown SID
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: Mon, 01 Jan 1990 00:00:00 GMT
Date: Thu, 28 Mar 2024 02:51:58 GMT
Content-Type: text/html; charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Server: GSE
Accept-Ranges: none
Vary: Accept-Encoding
Transfer-Encoding: chunked

ac
<HTML>
<HEAD>
<TITLE>Unknown SID</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<!-- GSE Default Error -->
<H1>Unknown SID</H1>
<H2>Error 400</H2>
</BODY>
</HTML>

0

And it is spammed over and over to the logs. We need to handle this error with trying to reestablish a new session with the same token lounge.

It looks like we mostly lose the session when the screensaver is on. This is (potentially) fixed by allowing the session to be refreshed when it is invalid.

10. Changing window size in the browser restarts video on Playlet

To reproduce:

  • Cast a video from the browser (e.g. Chrome)
  • Seek to some position
  • In the browser, reduce video to mini player (or grow it back)
  • The video on Playlet restarts from the beginning
@iBicha iBicha added the enhancement New feature or request label Feb 26, 2024
@iBicha iBicha pinned this issue Feb 26, 2024
@iBicha iBicha added the bug Something isn't working label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant