justintv / Twitch-API

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

Interactive Embedded Player doesn't autoplay when going from Offline to Online, doesn't fire any events #669

Open jzisser9 opened 7 years ago

jzisser9 commented 7 years ago

Hello, I'm noticing some new, strange behavior with the interactive embedded player. If I embed the player for a channel that is currently offline, and the channel then goes online, normally the player would begin playing right away without any user intervention. The Twitch.Player.ONLINE event would also fire. Now, however, no events fire, and the player doesn't do anything after the channel comes online, either by pressing "Play" or refreshing the page. I'm not sure when this behavior started happening, but I can say that the last time I was doing some work with the interactive players was a couple of months back or so.

Is this a bug, or new intended behavior? I've noticed some other strange behaviors with the interactive player, like a channel being shown as Live after they go offline for several minutes, different sequences of events being fired, etc. In fact, this is what I've been able to figure out using a simple diagnostic page that logs all event callbacks that are fired:

Action Event Callbacks Fired
Embed player, channel is currently online Ready, Online, Play
Channel goes from online to offline Paused, Ended
Embed player, channel is currently offline Ready, Ended
Channel goes from Offline to Online NONE

Note, I can't seem to get a condition where Twitch.Player.OFFLINE fires.