WebView无法加载.m3u8流媒体

时间:2016-03-30 14:59:28

标签: android webview

在我的Android应用中,我使用此代码在WebView中创建和加载URL。

public class TVDetail extends AppCompatActivity{

private WebView mWebView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    super.onCreate(savedInstanceState);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_tvdetail);

    final String url = getIntent().getExtras().getString("tv_link");

    mWebView = (WebView) findViewById(R.id.tvWebView);

    mWebView.loadUrl(url);
}

加载它(我无法与之交互)

Original APP webView

这是Logcat(我看不到任何破碎的东西)

D/cr_Ime: [InputMethodManagerWrapper.java:27] Constructor
W/art: Attempt to remove local handle scope entry from IRT, ignoring
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
D/cr_Ime: [ImeAdapter.java:358] onViewFocusChanged: gainFocus [false]
D/cr_Ime: [ImeAdapter.java:326] hideKeyboard
D/cr_Ime: [InputMethodManagerWrapper.java:56] isActive: false
D/cr_Ime: [ImeAdapter.java:358] onViewFocusChanged: gainFocus [true]
D/cr_Ime: [ImeAdapter.java:140] onCreateInputConnection returns null.
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 6307
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@28002dbe time:3106426950
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 6307
D/cr_Ime: [ImeAdapter.java:253] updateKeyboardVisibility: type [0->0], flags [0], show [true], 
D/cr_Ime: [ImeAdapter.java:326] hideKeyboard
D/cr_Ime: [InputMethodManagerWrapper.java:56] isActive: true
D/cr_Ime: [InputMethodManagerWrapper.java:65] hideSoftInputFromWindow
D/cr_Ime: [ImeAdapter.java:253] updateKeyboardVisibility: type [0->0], flags [0], show [true], 
D/cr_Ime: [ImeAdapter.java:326] hideKeyboard
D/cr_Ime: [InputMethodManagerWrapper.java:56] isActive: true
D/cr_Ime: [InputMethodManagerWrapper.java:65] hideSoftInputFromWindow

然后我用相同的代码创建了另一个App来尝试解决问题,但在新的App中,WebView正确加载并且我可以与它进行交互

Other APP webView

我已经坚持这个问题好几天了,我在互联网上搜索过,但我找不到任何可能的解决方案。

0 个答案:

没有答案