plugins.twitch: add --twitch-access-token-param #4952
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
--twitch-api-header
was added in #4156 as an alternative to--http-header
for setting generic/arbitrary headers on each Twitch API request, like authentication data for example (--twitch-api-header="Authorization=OAuth some-token"
). It is therefore a useful plugin parameter, as it allows bypassing ads (to an extend). Adding a plugin parameter for generic key+value pairs on the access token API request via--twitch-access-token-param
could be useful as well for the same reason.Having
--twitch-access-token-param
allows setting differentplayerType
API request parameter values for example. The default value of this isembed
, which makes Streamlink retrieve an access token for Twitch's embeddable web player.site
is another valid value.In the past we've had to change this multiple times and reverted everything back again (see #3210). Adding this parameter allows for customizations made by users without having to modify the plugin itself. Should there be any new developments in terms of special Twitch players with access tokens without embedded ads, then this parameter is a way to quickly test and adapt to that, without having to publish new releases and having to potentially revert stuff.