Hey guys,
I am working on an app where you can watch a random streamer that you follow. I have embedded the twitch player with a web view. It almost works. What I mean by this, is if you hit pause, and then play, it works perfectly. But it will not work upon initial load. It will just keep buffering.
Here is my log:
D/AudioTrack: stop() called with 10721600 frames delivered
W/cr_MediaCodecBridge: Releasing: OMX.qcom.video.decoder.avc
I/chromium: [INFO:CONSOLE(0)] “The SSL certificate used to load resources from https://player.twitch.tv will be distrusted in the future. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information.”, source: https://player.twitch.tv/?channel=anthony_kongphan&html5 (0)
D/SurfaceUtils: disconnecting from surface 0x76ddf18010, reason disconnectFromSurface
W/cr_MediaCodecBridge: Codec released
I/chromium: [INFO:CONSOLE(28)] “setStatsEnabled has been deprecated.”, source: https://player.twitch.tv/js/player.1779a152828f4ec07cf6.js (28)
I/chromium: [INFO:CONSOLE(0)] “The SSL certificate used to load resources from https://api.twitch.tv will be distrusted in the future. Once distrusted, users will be prevented from loading these resources. See https://g.co/chrome/symantecpkicerts for more information.”, source: https://player.twitch.tv/?channel=anthony_kongphan&html5 (0)
I/chromium: [INFO:CONSOLE(28)] “failed to resolve properties promise”, source: https://player.twitch.tv/js/player.1779a152828f4ec07cf6.js (28)
I/chromium: [INFO:CONSOLE(28)] “failed to resolve properties promise”, source: https://player.twitch.tv/js/player.1779a152828f4ec07cf6.js (28)
I/chromium: [INFO:CONSOLE(1)] “localStorage not available:”, source: https://cvp.twitch.tv/2.2.404/mediaplayer.min.js (1)
The code:
WebView webView;
webView = findViewById(R.id.webView);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webView.loadUrl(url);
If anyone has any idea how I can fix this, I would greatly appreciate it. Thank you for reading.