【问题标题】:Android webview unable to play videos other than mp4 formatAndroid webview 无法播放 mp4 格式以外的视频
【发布时间】:2019-07-27 03:55:56
【问题描述】:

我正在使用视频 url 的链接创建 Webview 意图。 但是目前只有 mp4 视频在 webview 中播放,其他格式(flv、mkv 等)视频只是显示空白屏幕

这是我打开 webview 时的 android studio logcat:

W/cr_media: Requires BLUETOOTH permission
W/VideoCapabilities: Unrecognized profile 4 for video/hevc
W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es

这里是 webview 设置:

webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setBuiltInZoomControls(true);
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setDomStorageEnabled(true);
webView.setInitialScale(1);

【问题讨论】:

    标签: android android-studio


    【解决方案1】:

    从那以后,没有人回答这个问题。我继续使用 exomedia 库,而不是 webview。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-09
      相关资源
      最近更新 更多