Could someone explain this please?
I have the following code
var player = new Twitch.Player(channel, options);
player.addEventListener(Twitch.Player.READY, handleReady);
function handleReady() {
console.log(player._bridge)
console.log(player._bridge._playerState)
// do something once you have player information
}
I’m trying to access the object information of player._bridge._playerState, when I console.log(player._bridge) I’m able to see several options of which I want the object _playerState that contains things like, channelName, duration, playback, etc…
But once I go a level deeper and console.log(player._bridge._playerState) all the keys now have no value and are empty.
Does anyone know why this is happening? What am I doing wrong? How can I access things like duration, playback, viewers etc… of a player???