Closed dylannz closed 8 years ago
With some more experimentation it appears a bunch of the API methods simply do nothing at the moment:
setVolume getCurrentTime setChannel pause
No idea why.
So I believe setChannel() works if a channel is already set. However, if there is no valid channel set in the options then setChannel() doesn't work.
Is there a way to intialize the Interactive Twitch Video Player without loading a channel? Then use setChannel after a user picks a channel?
var options = {
width: 854,
height: 480,
//channel: "{CHANNEL}"
};
//Initialized with no channel set but available to setChannel()
var player = new Twitch.Player("twitch-player", options);
// code....
// User click event to set channel
player.setChannel("xerokynos");
It gives no indication of failure, which suggests the behaviour is probably not what's expected. It really should work with an empty channel on initialisation.
similar to: https://github.com/justintv/Twitch-API/issues/534
Fingers crossed that this gets cleared up! ><
This should be resolved now. @dylannz You're 2nd link now works. https://andchill.tv/twitch-test2.html
Brilliant, thanks heaps!
Hey - I set up some very simple pages based on the API examples to try and debug the problems we were having with Twitch's API:
https://andchill.tv/twitch-test.html https://andchill.tv/twitch-test2.html
One uses setChannel, one specifies the channel in the options object. The one with setChannel doesn't work for me, just loads forever.
Here's the JS:
No errors, just never loads.