i create my own browser extension for my twitch channel.
I coded the javascript extension with the Twitch Kraken API but it has been changed.
The new Twitch API is 'https://api.twitch.tv/helix/streams?game_id=33214'
I replaced the API in my code but the extension always displays an ONLINE status.
xhr.open('GET', this.API_URL_STREAM, true)
xhr.setRequestHeader('Accept', 'application/vnd.twitchtv.v5+json')
xhr.setRequestHeader('Client-ID', this.CLIENT_ID)
xhr.onreadystatechange = e => {
if (xhr.readyState == 4 && xhr.status == 200) {
const body = xhr.responseText
let json = {}
try {
json = JSON.parse(body)
} catch (e) {
console.info(e, xhr.responseText)
}
this.handle_response(json)
}
}
xhr.send(null)
}
I have no error message. Just always an ONLINE status of my stream but i'm not live.