justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 381 forks source link

Player API can't independently access multiple players embedded on the same page #502

Open seanbutnotheard opened 8 years ago

seanbutnotheard commented 8 years ago

Using the new player API, I have two embeds on the same page, created using something like this:

tags= ['kbmod', 'elajjaz'];
for(key in tags) {
  player_objs[tags[key]] = new Twitch.Player("stream-" + tags[key], { channel: tags[key] });
}

It embeds two separate players perfectly, however they seem to be referring to the same object when I try to access them independently, which produces random results: 2016-02-19-14 32 25 This makes it impossible to reliably control any of the players... in my case, I'm trying to unmute one player and mute the other(s).

mrjumjum commented 8 years ago

We are looking into this.

thormug commented 8 years ago

Bug confirmed here. When multiple players are embedded in the same page, player.getChannel() return arbitrary value about 1 of the players embedded but not the specific in the variable "player".

In my case, i want to reload a specific player when delay is too important.

scottrabin commented 8 years ago

@seanbutnotheard @thormug this issue should be resolved