允许HTTPS、HTTP混合内容,解决微信网页视频无法播放的问题

This commit is contained in:
sonichy 2021-03-02 12:52:51 +08:00
parent c603d8265b
commit f3287f3ac7
5 changed files with 13 additions and 11 deletions

BIN
app.apk

Binary file not shown.

View File

@ -2,7 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hty.browser" package="com.hty.browser"
android:versionCode="4" android:versionCode="4"
android:versionName="4.16"> android:versionName="4.17">
<application <application
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"

View File

@ -9,7 +9,7 @@ p { text-indent:2em; }
</style> </style>
</head> </head>
<body> <body>
<h2 align=center><img src=logo.png><br>海天鹰浏览器 V4.15</h2> <h2 align=center><img src=logo.png><br>海天鹰浏览器 V4.17</h2>
<p>内置扩展的浏览器。</p> <p>内置扩展的浏览器。</p>
<p>扩展:链接关键字过滤,链接关键字高亮,图片自定义过滤,视频独立播放。</p> <p>扩展:链接关键字过滤,链接关键字高亮,图片自定义过滤,视频独立播放。</p>
<p>作者:海天鹰</p> <p>作者:海天鹰</p>
@ -23,6 +23,7 @@ p { text-indent:2em; }
<p><a href="https://stackoverflow.com/questions/3462582/display-the-android-webviews-favicon" target="_blank">获取网页图标</a></p> <p><a href="https://stackoverflow.com/questions/3462582/display-the-android-webviews-favicon" target="_blank">获取网页图标</a></p>
<p><a href="https://www.jianshu.com/p/c9a18050a249" target="_blank">字符串转Bitmap</a></p> <p><a href="https://www.jianshu.com/p/c9a18050a249" target="_blank">字符串转Bitmap</a></p>
<h3>更新日志:</h3> <h3>更新日志:</h3>
<h3>V4.17 (2021-03-02)</h3><ol><li>允许HTTPS、HTTP混合内容解决微信网页视频无法播放的问题。</li></ol>
<h3>V4.16 (2020-10-14)</h3><ol><li>取消引起崩溃的复制图片。</li></ol> <h3>V4.16 (2020-10-14)</h3><ol><li>取消引起崩溃的复制图片。</li></ol>
<h3>V4.15 (2020-10-01)</h3><ol><li>优化猜测下载文件名。</li></ol> <h3>V4.15 (2020-10-01)</h3><ol><li>优化猜测下载文件名。</li></ol>
<h3>V4.14 (2020-09-20)</h3><ol><li>优化下载对话框百度网页图片文件名填充,支持修改下载文件名。</li></ol> <h3>V4.14 (2020-09-20)</h3><ol><li>优化下载对话框百度网页图片文件名填充,支持修改下载文件名。</li></ol>

View File

@ -28,7 +28,6 @@ import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.ClipData; import android.content.ClipData;
import android.content.ClipboardManager; import android.content.ClipboardManager;
import android.content.ContentResolver;
import android.content.ContentValues; import android.content.ContentValues;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
@ -1204,9 +1203,8 @@ public class MainActivity extends Activity {
void settingWebView(WebView webView) { void settingWebView(WebView webView) {
registerForContextMenu(webView); // 注册菜单 registerForContextMenu(webView); // 注册菜单
webView.requestFocusFromTouch(); // 请求触摸焦点 webView.requestFocusFromTouch(); // 请求触摸焦点
if(Build.VERSION.SDK_INT >= 19) {
webView.setWebContentsDebuggingEnabled(true); // 允许调试 webView.setWebContentsDebuggingEnabled(true); // 允许调试
}
WebSettings webSettings = webView.getSettings(); WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true); // 开启JS webSettings.setJavaScriptEnabled(true); // 开启JS
webSettings.setJavaScriptCanOpenWindowsAutomatically(true); // 允许JS打开窗口 webSettings.setJavaScriptCanOpenWindowsAutomatically(true); // 允许JS打开窗口
@ -1223,6 +1221,9 @@ public class MainActivity extends Activity {
webSettings.setGeolocationEnabled(true); // 开启定位 webSettings.setGeolocationEnabled(true); // 开启定位
webSettings.setSupportMultipleWindows(true); // 支持多窗口 webSettings.setSupportMultipleWindows(true); // 支持多窗口
webSettings.setAllowUniversalAccessFromFileURLs(true); // 允许跨域 webSettings.setAllowUniversalAccessFromFileURLs(true); // 允许跨域
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); // 允许HTTPSHTTP混合内容
}
webView.setWebViewClient(new WebViewClient() { webView.setWebViewClient(new WebViewClient() {
@Override @Override

View File

@ -1 +1 @@
4.16 4.17