Skip to content

Commit b708c26

Browse files
committed
[PATCH] plugins.twitch: set playerType back to embed (streamlink#4194)
This partly reverts dfea62a
1 parent dfeb79e commit b708c26

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/streamlink/plugins/twitch.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def access_token(self, is_live, channel_or_vod):
315315
login=channel_or_vod if is_live else "",
316316
isVod=not is_live,
317317
vodID=channel_or_vod if not is_live else "",
318-
playerType="site"
318+
playerType="embed"
319319
)
320320
subschema = validate.any(None, validate.all(
321321
{
@@ -606,6 +606,10 @@ def _get_hls_streams_live(self):
606606

607607
# only get the token once the channel has been resolved
608608
log.debug("Getting live HLS streams for {0}".format(self.channel))
609+
self.session.http.headers.update({
610+
"referer": "https://player.twitch.tv",
611+
"origin": "https://player.twitch.tv",
612+
})
609613
sig, token, restricted_bitrates = self._access_token(True, self.channel)
610614
url = self.usher.channel(self.channel, sig=sig, token=token, fast_bread=True)
611615

0 commit comments

Comments
 (0)