hyzp_ybqx-Commit063:播放违章视频时,隐藏雨刷、缩放按钮

This commit is contained in:
WinUser01
2022-01-01 21:06:32 +08:00
parent 7302718e55
commit bf1be3b9bd
+31 -12
View File
@@ -148,8 +148,11 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
int btnCount = 4; //每行按钮个数
int btnCount3 = listData.length; //每行按钮个数
var mediaSize = MediaQuery.of(context).size;
double btn_left = 70; //第一按钮行高度
double btn_gap = 70; //第一按钮行高度
// widget.id:播放点位视频的点位编号,-2 表示播放违章视频
double btn_left = -2 == widget.id ? 347 : 70; //第一按钮行高度
double btn_gap = -2 == widget.id ? 104 : 70; //第一按钮行高度
//远程控制球机方向按钮外半径和内半径
double _outerRadius = 270;
double _innerRadius = _outerRadius / 2;
@@ -266,36 +269,52 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
restartPlay(urlnew);
},
),
SizedBox(width: ScreenUtil().setWidth(btn_gap)),
getRoundButton_image(
// widget.id:播放点位视频的点位编号,-2 表示播放违章视频
-2 == widget.id
? SizedBox.shrink()
: SizedBox(width: ScreenUtil().setWidth(btn_gap)),
-2 == widget.id
? SizedBox.shrink()
: getRoundButton_image(
text: '雨刷',
image_path: 'assets/images/wiper.png',
diameter: 130,
onPress: () {
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 3);
setSphericalCameraDio(
id: widget.id, dwip: widget.dwip, cmdCode: 3);
},
),
SizedBox(width: ScreenUtil().setWidth(btn_gap)),
getRoundButton_image(
-2 == widget.id
? SizedBox.shrink()
: SizedBox(width: ScreenUtil().setWidth(btn_gap)),
-2 == widget.id
? SizedBox.shrink()
: getRoundButton_image(
text: '放大',
image_path: 'assets/images/zoom_in.png',
imageSize: 72,
diameter: 130,
onPress: () {
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 11);
setSphericalCameraDio(
id: widget.id, dwip: widget.dwip, cmdCode: 11);
},
),
SizedBox(width: ScreenUtil().setWidth(btn_gap)),
getRoundButton_image(
-2 == widget.id
? SizedBox.shrink()
: SizedBox(width: ScreenUtil().setWidth(btn_gap)),
-2 == widget.id
? SizedBox.shrink()
: getRoundButton_image(
text: '缩小',
image_path: 'assets/images/zoom_out.png',
imageSize: 72,
diameter: 130,
onPress: () {
// 云台控制代码:1:停止动作、3:启动雨刷、11:焦距变大、12:焦距变小
setSphericalCameraDio(id: widget.id, dwip: widget.dwip, cmdCode: 12);
setSphericalCameraDio(
id: widget.id, dwip: widget.dwip, cmdCode: 12);
},
),
],
@@ -312,7 +331,7 @@ class _SuperPlayerPageState extends State<SuperPlayerPage> with SuperPlayerListe
// 进行像素单位转换,解决按钮响应错乱问题
innerRadius: _innerRadius / ScreenUtil().pixelRatio,
outerRadius: _outerRadius / ScreenUtil().pixelRatio,
callback: -2 == widget.id
callback: -2 == widget.id // 播放点位视频的点位编号,-2 表示播放违章视频
? null
: (status) {
///点击回调