Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Player won't load - setChannel not working #510

Closed
dylannz opened this issue Mar 12, 2016 · 6 comments
Closed

Player won't load - setChannel not working #510

dylannz opened this issue Mar 12, 2016 · 6 comments

Comments

@dylannz
Copy link

dylannz commented Mar 12, 2016

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:

var options = {
    width: 854,
    height: 480,
    channel: "esl_csgo", 
};
var player = new Twitch.Player("twitch-player", options);
player.setVolume(0.5);
var options = {
    width: 854,
    height: 480,
};
var player = new Twitch.Player("twitch-player", options);
player.setVolume(0.5);
player.setChannel("esl_csgo");

No errors, just never loads.

@dylannz
Copy link
Author

dylannz commented Mar 12, 2016

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.

@tadachi
Copy link

tadachi commented Mar 16, 2016

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");

@dylannz
Copy link
Author

dylannz commented Mar 29, 2016

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.

@lbrtmrtnz
Copy link

similar to: #534

Fingers crossed that this gets cleared up! ><

@mrjumjum
Copy link
Contributor

This should be resolved now.
@dylannz You're 2nd link now works. https://andchill.tv/twitch-test2.html

@dylannz
Copy link
Author

dylannz commented May 1, 2016

Brilliant, thanks heaps!

@dylannz dylannz closed this as completed May 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants