Skip to content

plugins.twitch: add device-id headers #4086

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

Merged
merged 2 commits into from
Oct 10, 2021

Conversation

back-to
Copy link
Collaborator

@back-to back-to commented Oct 10, 2021

server_ads is False and should skip ADs for now,
also show some debug informations.

{
    'adblock': False,
    'geoblock_reason': '',
    'expires': 163300000,
    'hide_ads': False,
    'server_ads': False,
    'show_ads': True
}

Ref https://github.com/pixeltris/TwitchAdSolutions/blob/master/bypass/bypass-ublock-origin.js
Ref #3210

`server_ads` is `False` and should skip ADs for now,
also show some debug informations.

```json
{
    'adblock': False,
    'geoblock_reason': '',
    'expires': 163300000,
    'hide_ads': False,
    'server_ads': False,
    'show_ads': True
}
```

Ref https://github.com/pixeltris/TwitchAdSolutions/blob/master/bypass/bypass-ublock-origin.js
@back-to back-to added the plugin enhancement A new feature for a working Plugin label Oct 10, 2021
Copy link
Member

@bastimeyer bastimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same cat-and-mouse game once again (fourth time that we're adding special headers or params). If Twitch decides to block all access token requests with these headers, then this will break the entire plugin - just saying... We can try adding it though, but keep in mind that there's currently a breaking change on the master branch, which would make an "emergency release" a bit unprepared.

@bastimeyer bastimeyer changed the title plugins.twitch: skip ADs plugins.twitch: add device-id headers Oct 10, 2021
@bastimeyer bastimeyer merged commit 8a0b659 into streamlink:master Oct 10, 2021
Billy2011 pushed a commit to Billy2011/streamlink-27 that referenced this pull request Oct 11, 2021
@back-to back-to deleted the Twitch_20211010 branch October 13, 2021 10:24
@bastimeyer
Copy link
Member

Can someone confirm?
With the device headers, I get lots of short midroll ads but no preroll ads, but if I remove the headers again, I only get preroll ads but not midroll ads.

Midroll ads are far worse for Streamlink's output due to the stream discontinuities. Filtering out preroll ads just delays the stream start.

@Wishbringer
Copy link

Can confirm that "twitch-web-wall-mason" doesn't work anymore, causes midroll screen.

light4 pushed a commit to light4/streamlink that referenced this pull request Dec 9, 2022
as well as access token debug logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin enhancement A new feature for a working Plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants