我想要使用包含Twitch WebPlayer的webView。但是,當我啓動我的應用程序時,播放器不希望啓動(抽搐定義如果我們需要使用Flash或HTML5播放器)。我的應用程序啓動HTML5播放器,但她正在加載,加載,加載...她無法啓動流。交叉來源請求僅支持http,數據,https
wv = (WebView) rootView.findViewById(R.id.webView);
WebSettings webSettings = wv.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setUseWideViewPort(true);
webSettings.setLoadWithOverviewMode(true);
// Load the Twitch Stream you want
// Actually, this is the most important line if code
// The "embed" searches for the suitable stream format
wv.loadUrl("http://www.twitch.tv/MyChannel/embed");
(如果你想嘗試,通道爲例:OgamingLOL)
如果我OgamingLoL嘗試,在我的logcat我有:
08-24 15:30:00.546 19102-19102/com.xx I/chromium﹕ [INFO:CONSOLE(0)] "XMLHttpRequest cannot load chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js. Cross origin requests are only supported for protocol schemes: http, data, https.", source: http://www.twitch.tv/OgamingLoL/embed (0)
08-24 15:30:00.546 19102-19102/com.xx I/chromium﹕ [INFO:CONSOLE(0)] "XMLHttpRequest cannot load chrome-extension://dliochdbjfkdbacpmhlcpmleaejidimm/cast_sender.js. Cross origin requests are only supported for protocol schemes: http, data, https.", source: http://www.twitch.tv/OgamingLoL/embed (0)
08-24 15:30:00.547 19102-19102/com.xx I/chromium﹕ [INFO:CONSOLE(0)] "XMLHttpRequest cannot load chrome-extension://hfaagokkkhdbgiakmmlclaapfelnkoah/cast_sender.js. Cross origin requests are only supported for protocol schemes: http, data, https.", source: http://www.twitch.tv/OgamingLoL/embed (0)
08-24 15:30:00.547 19102-19102/com.xx I/chromium﹕ [INFO:CONSOLE(0)] "XMLHttpRequest cannot load chrome-extension://fmfcbgogabcbclcofgocippekhfcmgfj/cast_sender.js. Cross origin requests are only supported for protocol schemes: http, data, https.", source: http://www.twitch.tv/OgamingLoL/embed (0)
08-24 15:30:00.547 19102-19102/com.xx I/chromium﹕ [INFO:CONSOLE(0)] "XMLHttpRequest cannot load chrome-extension://enhhojjnijigcajfphajepfemndkmdlo/cast_sender.js. Cross origin requests are only supported for protocol schemes: http, data, https.", source: http://www.twitch.tv/OgamingLoL/embed (0)
我已經嘗試獲取的結果,但我沒看到它......
你能幫助我PLS =)
謝謝你,有一個美好的一天:p
我升級我的帖子 – Argardor