Hey guys, I’m running a website locally on machine and it gives me the
error.I’ve set parent as local host, but it’s still giving me error.
Behind iframes I’m running js to pull 4 most played streams. I’m kinda lost what can I do more to troubleshoot since console is giving me no errors. There is a header in the script, but I’ve removed it due to security reasons.
const url = "https://api.twitch.tv/helix/streams?game_id=513319";
const time_interval = 100000;
async function getStream () {
const done = await fetch(url,{
method: 'GET',
headers:header,
});
const peklo = await done.json();
for (let i = 0 ; i < 4 ; i++){
document.getElementById('frame' + (i+1) ).src = "https://player.twitch.tv/?channel="+ peklo.data[i].user_name +"&parent=localhost"+"&muted=true"+"$allowfullscreen=false"
}
};
getStream();
setInterval(getStream,time_interval);