Here’s how it happens:
You get the token and signature here:
https://api.twitch.tv/api/channels/CHANNEL_NAME/access_token
Then you use it here to get the m3u8 for CHANNE_NAME:
https://usher.ttvnw.net/api/channel/hls/CHANNEL_NAME.m3u8?
The URI encoded JSON token:
token=TOKEN&
The signature:
sig=SIGNATURE&
These do something
allow_source=true&
player_backend=html5&
Experiment example:
baking_bread=true
And then you go from there.