|
|
@@ -19,8 +19,9 @@ class CartoonMaterialControls extends StatefulWidget {
|
|
|
final VoidCallback onTapPrevious;
|
|
|
final VoidCallback onTapLove;
|
|
|
final ValueNotifier<int> isCollect;
|
|
|
+ final ValueNotifier<int> isLoadingVideo;
|
|
|
|
|
|
- const CartoonMaterialControls({Key key, this.enableQuickControl = false, this.moreVideo, this.onTapMoreVideo, this.onTapNext, this.onTapPrevious, this.onTapLove, this.isCollect}) : super(key: key);
|
|
|
+ const CartoonMaterialControls({Key key, this.enableQuickControl = false, this.moreVideo, this.onTapMoreVideo, this.onTapNext, this.onTapPrevious, this.onTapLove, this.isCollect, this.isLoadingVideo}) : super(key: key);
|
|
|
|
|
|
@override
|
|
|
State<StatefulWidget> createState() {
|
|
|
@@ -656,6 +657,9 @@ class CartoonMaterialControlsState extends State<CartoonMaterialControls> {
|
|
|
}
|
|
|
|
|
|
void _playPause() {
|
|
|
+ if (widget.isLoadingVideo.value == 1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
bool isFinished = _latestValue.position >= _latestValue.duration;
|
|
|
|
|
|
setState(() {
|