Widget _buildPlayControlView()

in lib/aliplayer_widget.dart [176:203]


  Widget _buildPlayControlView() {
    // 长按控制
    bool enableLongPress = !_isSceneLive();
    // 拖动控制
    bool enableDrag = !_isSceneLive();
    // 竖向手势控制
    bool enableVerticalGestures = !_isSceneListPlayer();
    return AliPlayerPlayControlWidget(
      autoHide: true,
      onVisibilityChanged: (bool isVisible) {
        _togglePlayControlVisibility(forceHide: !isVisible);
      },
      onDoubleTap: _onPlayerViewDoubleTap,
      onLongPressStart: enableLongPress ? _onPlayerViewLongPress : null,
      onLongPressEnd: enableLongPress ? _onPlayerViewLongPressEnd : null,
      onHorizontalDragUpdate:
          enableDrag ? _onPlayerViewHorizontalDragUpdate : null,
      onHorizontalDragEnd: enableDrag ? _onPlayerViewHorizontalDragEnd : null,
      onLeftVerticalDragUpdate:
          enableVerticalGestures ? _onPlayerViewLeftVerticalDragUpdate : null,
      onLeftVerticalDragEnd:
          enableVerticalGestures ? _onPlayerViewLeftVerticalDragEnd : null,
      onRightVerticalDragUpdate:
          enableVerticalGestures ? _onPlayerViewRightVerticalDragUpdate : null,
      onRightVerticalDragEnd:
          enableVerticalGestures ? _onPlayerViewRightVerticalDragEnd : null,
    );
  }