Hi I am using twitch embeding on my android app but suddenly it stopped working and I am not able to figure out what is wrong. Here it is my code which I am using. Its showing me blank screen.
html ="<body bgcolor=“000000”><script src=“https://player.twitch.tv/js/embed/v1.js”><div id=“twitch-embed”><script type=“text/javascript”>";
html+=“var meta = document.createElement(‘meta’);meta.setAttribute(‘name’, ‘viewport’);meta.setAttribute(‘content’, ‘width=device-width’);”;
html+=“document.getElementsByTagName(‘head’)[0].appendChild(meta);var options = {width: 675,height: 330,channel: “exampeer”, controls: false};”;
html+= “var player = new Twitch.Player(“twitch-embed”, options); player.setVolume(1.0);”;
displayVideo.post(new Runnable() {
public void run() {
int width = displayVideo.getWidth();
int height = displayVideo.getHeight();
displayVideo.loadDataWithBaseURL("https://player.twitch.tv/", html, "text/html", "utf-8", null);
}
});
Here displayvideo is my webview. Please help me asap.