提交 917a0248 authored 作者: jungleiOS's avatar jungleiOS

亮度系数调整

上级 52efcef6
......@@ -78,10 +78,10 @@ class _MyAppState extends State<MyApp> {
playOptions: VideoPlayOptions(
seekSeconds: 30,
//左侧垂直手势调节视频亮度的单位(0~1之间,不能小于0,不能大于1)
brightnessGestureUnit: 0.005,
brightnessGestureUnit: 0.01,
//右侧垂直手势调节视频音量的单位(0~1之间,不能小于0,不能大于1)
volumeGestureUnit: 0.005,
//横行手势调节视频进度的单位秒数
//横行手势调节视频进度的单位秒数
progressGestureUnit: 2000,
aspectRatio: 16 / 9,
loop: false,
......
......@@ -821,8 +821,6 @@ class GZVideoPlayerState extends State<GZVideoPlayer>
widget.onBrightness?.call(_brightness.value);
await ScreenBrightness().setScreenBrightness(_brightness.value);
}
// Screen.setBrightness(brightness);
}
},
onVerticalDragEnd: (DragEndDetails details) {},
......
import 'dart:io';
import 'package:gz_video_player/video_speed.dart';
/// 自定义播放参数
......@@ -9,11 +11,13 @@ class VideoPlayOptions {
this.seekSeconds = 15,
this.progressGestureUnit = 1000,
this.volumeGestureUnit = 0.005,
this.brightnessGestureUnit = 0.005,
double? brightnessGestureUnit,
this.autoplay = true,
this.allowScrubbing = true,
List<VideoSpeedItem>? speedList,
}) : speedList = speedList ??
}) : brightnessGestureUnit =
brightnessGestureUnit ?? (Platform.isIOS ? 0.01 : 0.005),
speedList = speedList ??
[
VideoSpeedItem(speed: 0.5, title: '0.5X'),
VideoSpeedItem(speed: 0.75, title: '0.75X'),
......@@ -33,7 +37,7 @@ class VideoPlayOptions {
/// 视频快进秒数
final int seekSeconds;
/// 设置(横向)手势调节视频进度的秒数单位,默认为`1s`
/// 设置(横向)手势调节视频进度的毫秒数单位,默认为`1000ms`
final int progressGestureUnit;
/// 设置(右侧垂直)手势调节视频音量的单位,必须为0~1之间(不能小于0,不能大于1),默认为`0.01`
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论