fixed black screen issue

This commit is contained in:
LagradOst 2021-09-12 19:56:50 +02:00
parent 2acae76c5e
commit b00aea18db
3 changed files with 5 additions and 5 deletions

View file

@ -31,8 +31,8 @@ android {
applicationId "com.lagradost.cloudstream3"
minSdkVersion 21
targetSdkVersion 30
versionCode 24
versionName "1.9.8"
versionCode 25
versionName "1.9.9"
resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}"

View file

@ -475,7 +475,7 @@ class PlayerFragment : Fragment() {
}
private fun setBrightness(context: Context?, alpha: Float) {
val realAlpha = minOf(1f, maxOf(alpha, 0.005f)) // clamp
val realAlpha = minOf(1f - 0.05f, maxOf(alpha, 0f)) // clamp
if (useSystemBrightness) {
if (useTrueSystemBrightness) {
Settings.System.putInt(
@ -1021,7 +1021,7 @@ class PlayerFragment : Fragment() {
}
if (swipeVerticalEnabled)
setBrightness(context, context?.getKey(VIDEO_PLAYER_BRIGHTNESS) ?: 1f)
setBrightness(context, context?.getKey(VIDEO_PLAYER_BRIGHTNESS) ?: 0f)
navigationBarHeight = requireContext().getNavigationBarHeight()
statusBarHeight = requireContext().getStatusBarHeight()

View file

@ -9,7 +9,7 @@ import com.fasterxml.jackson.module.kotlin.KotlinModule
const val DOWNLOAD_HEADER_CACHE = "download_header_cache"
//const val WATCH_HEADER_CACHE = "watch_header_cache"
const val DOWNLOAD_EPISODE_CACHE = "download_episode_cache"
const val VIDEO_PLAYER_BRIGHTNESS = "video_player_alpha"
const val VIDEO_PLAYER_BRIGHTNESS = "video_player_alpha_key"
const val HOMEPAGE_API = "home_api_used"
const val SEARCH_PROVIDER_TOGGLE = "settings_providers_toggle"