I am using Webview to load the video. The webview is connect to javascript and html, which is a interactive embed player.
However, I got these error:
Uncaught (in promise) undefined
invalid operation: t.channel is not implemented
value @ player.42430df….js:8 api.twitch.tv/api/viewer/token.json Failed to load resource: the server responded with a status of 401 ()
player.42430df….js:8 Invalid operation: t.channel is not implemented
value @ player.42430df….js:8 api.twitch.tv/kraken/user Failed to load resource: the server responded with a status of 401 ()
The error says it’s unauthorized. It’s wired to authorized a embedded video.
My code is like this:
var options = {
width : '100%',
height : '100%',
};
player = new Twitch.Player("player", options);
player.setVideo(id.toString());
Set the video ID in the options, if possible, or on the ready event. Auth is not required; the 401s tell the player it’s not a logged in user so it doesn’t enable additional functionality it has for logged in users.