add separate preference for fsvideo player
This commit is contained in:
parent
4493b17723
commit
80f5751d9a
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.fox.ttrss"
|
package="org.fox.ttrss"
|
||||||
android:versionCode="293"
|
android:versionCode="294"
|
||||||
android:versionName="1.84" >
|
android:versionName="1.85" >
|
||||||
|
|
||||||
<uses-sdk
|
<uses-sdk
|
||||||
android:minSdkVersion="10"
|
android:minSdkVersion="10"
|
||||||
|
@ -318,6 +318,7 @@ public class ArticleFragment extends Fragment {
|
|||||||
});
|
});
|
||||||
|
|
||||||
boolean acceleratedWebview = true;
|
boolean acceleratedWebview = true;
|
||||||
|
boolean enableFullscreenVideo = m_prefs.getBoolean("enable_fs_video", false);
|
||||||
|
|
||||||
// prevent flicker in ics
|
// prevent flicker in ics
|
||||||
if (!m_prefs.getBoolean("webview_hardware_accel", true) || useTitleWebView) {
|
if (!m_prefs.getBoolean("webview_hardware_accel", true) || useTitleWebView) {
|
||||||
@ -375,9 +376,11 @@ public class ArticleFragment extends Fragment {
|
|||||||
} else {
|
} else {
|
||||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
ws.setJavaScriptEnabled(true);
|
ws.setJavaScriptEnabled(true);
|
||||||
m_chromeClient = new FSVideoChromeClient(view);
|
|
||||||
|
|
||||||
m_web.setWebChromeClient(m_chromeClient);
|
if (enableFullscreenVideo) {
|
||||||
|
m_chromeClient = new FSVideoChromeClient(view);
|
||||||
|
m_web.setWebChromeClient(m_chromeClient);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -442,7 +445,7 @@ public class ArticleFragment extends Fragment {
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
if (savedInstanceState == null || !acceleratedWebview)
|
if (savedInstanceState == null || !acceleratedWebview || !enableFullscreenVideo)
|
||||||
m_web.loadDataWithBaseURL(baseUrl, content, "text/html", "utf-8", null);
|
m_web.loadDataWithBaseURL(baseUrl, content, "text/html", "utf-8", null);
|
||||||
else
|
else
|
||||||
m_web.restoreState(savedInstanceState);
|
m_web.restoreState(savedInstanceState);
|
||||||
|
@ -259,4 +259,6 @@
|
|||||||
<string name="headline_display_mode_default">Default</string>
|
<string name="headline_display_mode_default">Default</string>
|
||||||
<string name="headline_display_mode_no_images">No images</string>
|
<string name="headline_display_mode_no_images">No images</string>
|
||||||
<string name="headline_display_mode_compact">Compact</string>
|
<string name="headline_display_mode_compact">Compact</string>
|
||||||
|
<string name="prefs_enable_fs_video_summary">May cause graphical glitches on some devices.</string>
|
||||||
|
<string name="prefs_enable_fs_video">Fullscreen video support</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -143,6 +143,12 @@
|
|||||||
android:key="use_volume_keys"
|
android:key="use_volume_keys"
|
||||||
android:summary="@string/use_volume_keys_long"
|
android:summary="@string/use_volume_keys_long"
|
||||||
android:title="@string/use_volume_keys" />
|
android:title="@string/use_volume_keys" />
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="enable_fs_video"
|
||||||
|
android:summary="@string/prefs_enable_fs_video_summary"
|
||||||
|
android:title="@string/prefs_enable_fs_video" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="full_screen_mode"
|
android:key="full_screen_mode"
|
||||||
|
Loading…
Reference in New Issue
Block a user