提交 4ca418a0 编写于 作者: S shuyu

1.4.1 修改了亮度不记录问题

上级 88a70320
......@@ -572,7 +572,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
showVolumeDialog(-deltaY, volumePercent);
} else if (!mChangePosition && mBrightness) {
float percent = -deltaY / mScreenHeight;
float percent = (-deltaY / mScreenHeight) / 4;
onBrightnessSlide(percent);
}
......@@ -1058,14 +1058,14 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
* @param percent
*/
private void onBrightnessSlide(float percent) {
if (mBrightnessData < 0) {
//if (mBrightnessData < 0) {
mBrightnessData = ((Activity) (mContext)).getWindow().getAttributes().screenBrightness;
if (mBrightnessData <= 0.00f) {
mBrightnessData = 0.50f;
} else if (mBrightnessData < 0.01f) {
mBrightnessData = 0.01f;
}
}
//}
WindowManager.LayoutParams lpa = ((Activity) (mContext)).getWindow().getAttributes();
lpa.screenBrightness = mBrightnessData + percent;
if (lpa.screenBrightness > 1.0f) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册