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
[x] 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
[x] 9. Unknown SID spammed error
[ ] 10. Changing window size in the browser restarts video on Playlet
[ ] 11. Disconnecting and connecting causes the current video to start over
[ ] 12. Casting clips doesn't start the video from the right position
1. YouTube mobile app overrides the current queue and screw up the currently playing video
To reproduce:
Start Playlet
Play a playlist (e.g. a playlist with 50 videos, and playing video n 3)
Connect from YouTube mobile app
Add a video to queue
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
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
11. Disconnecting and connecting causes the current video to start over
To reproduce:
Connect, cast a video
Seek to some position
Disconnect device and connect again
The video on Playlet restarts from the beginning
12. Casting clips doesn't start the video from the right position
When casting a clip, the video starts from the beginning of the video, not from the beginning of the clip.
This is because Playlet ignores player params, which contains the start time of the clip. After the video starts, seeking using the mobile app fixes this though.
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.Cast to
dialog1. YouTube mobile app overrides the current queue and screw up the currently playing video
To reproduce:
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
dialogThis 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 theLink 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
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:
11. Disconnecting and connecting causes the current video to start over
To reproduce:
12. Casting clips doesn't start the video from the right position
When casting a clip, the video starts from the beginning of the video, not from the beginning of the clip. This is because Playlet ignores player params, which contains the start time of the clip. After the video starts, seeking using the mobile app fixes this though.