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

Fix YouTube TV Support #213

Open
Leseratte10 opened this issue Dec 29, 2019 · 18 comments
Open

Fix YouTube TV Support #213

Leseratte10 opened this issue Dec 29, 2019 · 18 comments
Labels
help wanted Extra attention is needed

Comments

@Leseratte10
Copy link

Youtube provides a TV-friendly web page at https://youtube.com/tv that looks like one of these youtube apps on a smart TV, which also allows you to "send" a youtube video from your phone to that page to watch it on a bigger screen.

SponsorBlock currently doesn't work on that TV-optimized page, maybe support for that could be added? Mouse navigation seems to work a bit weird on that page at least in my browser (because it's optimized for TVs) so I don't know how easy it'd be to add the sponsor spot report buttons, but the playback feature (skipping spots that are already reported) should work similar to the normal YouTube page.

@ajayyy ajayyy added the help wanted Extra attention is needed label Dec 29, 2019
@NDevTK
Copy link
Contributor

NDevTK commented Dec 29, 2019

Going to youtube.com/tv seems to get redirected.
The user agent "AppleTV/tvOS/9.1.1" seems to fix this :D
(For debugging)
example video: https://www.youtube.com/tv#/watch/video/idle?v=dQw4w9WgXcQ&resume

@Leseratte10
Copy link
Author

Oh, right, sorry, forgot to add that. Youtube seems to block normal clients from that page. This chrome addon ( https://chrome.google.com/webstore/detail/youtube-for-tv/gmmbpchnelmlmndfnckechknbohhjpge ) fixes the user agent just for this youtube page so you don't manually need to change it.

@ajayyy
Copy link
Owner

ajayyy commented Dec 29, 2019

Ah, I was very confused

@ajayyy
Copy link
Owner

ajayyy commented Dec 29, 2019

Is this related to https://github.com/yuliskov/SmartYouTubeTV?

@Leseratte10
Copy link
Author

I don't know? Isn't that just basically a browser apk that automatically goes to youtube.com/tv?
I just manually visit that youtube page on my computer (with that chrome addon to spoof my user agent).

@NDevTK
Copy link
Contributor

NDevTK commented Dec 29, 2019

#214 (URL Parser support)

@ajayyy ajayyy closed this as completed Dec 29, 2019
@ajayyy ajayyy reopened this Dec 29, 2019
@ajayyy ajayyy changed the title SponsorBlock not working on TV-friendly youtube.com/tv page Add Green Bar to YouTube TV Dec 29, 2019
@ajayyy
Copy link
Owner

ajayyy commented Dec 29, 2019

Support has been added. This issue will be left open for the preview bar support.

@NDevTK
Copy link
Contributor

NDevTK commented Dec 29, 2019

Will there be buttons on the player?

@ajayyy
Copy link
Owner

ajayyy commented Dec 29, 2019

I don't think that is really necessary since this would be run off of a TV.

@ajayyy ajayyy changed the title Add Green Bar to YouTube TV Fix YouTube TV Support Jul 28, 2020
@ajayyy
Copy link
Owner

ajayyy commented Jul 28, 2020

Seems to be broken

@itskenny0
Copy link

@ajayyy Works just fine for me as of this moment, but the UI overlays the skip interface so its only halfway usable.

@nimaid
Copy link

nimaid commented Sep 22, 2020

@ajayyy This is currently not working for me.

OS: Windows 10
Browser: Firefox 80.0.1 (64-bit)
YouTube TV enabler: https://addons.mozilla.org/en-US/firefox/addon/youtube-for-tv/
Example non-working URL: https://www.youtube.com/tv/#/watch/video/control?v=bUGlwTi0D_Y&resume
Issue description: SopnsorBlock states that No YouTube video is found at this tab.

I have not tried Chrome yet.

@DraconicNEO
Copy link

For me it's able to detect the video but it's not able to skip anything or show segments.

@pl4nty
Copy link

pl4nty commented Aug 27, 2022

I'm having a similar experience, segments are detected but not shown/skipped. User agent is Mozilla/5.0 (Linux; Tizen 2.3) AppleWebKit/538.1 (KHTML, like Gecko)Version/2.3 TV Safari/538.1

@spj2401Dev
Copy link

It is still now working for me either. I can set submit timestamps over the addon on the top, but no timestamps or skips. Its just telling me that there were no segments found but it now recognises that I am on a YouTube page. I am using Chrome btw.

@mchangrh
Copy link
Contributor

Standalone

  • Skipping ✅
  • Previewbar ❌
    • previewbar is removed and recreated on every ui load

will test remote control later

@mchangrh
Copy link
Contributor

.take

@mchangrh
Copy link
Contributor

Trying to add events for leanback was inconclusive, so will leave this as a definitive catchall for tv playback issues

Events:
yt-navigate-finish ❌
yt-player-updated ❌
innertube-command ❌

it also loves reloading the UI with every single document.focus and document.blur change which makes binding to the previewbar every very difficult

Extensions: firefox chrome

Test UAs

Mozilla/5.0 (Linux; Tizen 2.3) AppleWebKit/538.1 (KHTML, like Gecko)Version/2.3 TV Safari/538.1

AppleTV/tvOS/9.1.1

The only URL that fails the v parameter check was reported in discord which featured a query parameter after an anchor and was revolved with this commit. Binding to the previewbar will require either a hook into their JS and/or a mutation observer

@mchangrh mchangrh removed their assignment Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

9 participants