play method
播放
Implementation
Future<void> play() async {
if (_dispose) {
return;
}
if (videoPlayerValue?.isInitialized == true) {
if (videoPlayerValue?.isPlaying ?? false) {
return;
}
await value.videoPlayerController?.play();
value.playerEventStreamController.sink
.add(BetterVideoPlayerEvent(value.playerKey, BetterVideoPlayerEventType.onPlay));
if (value.wifiInterrupted) {
value = value.copyWith(wifiInterrupted: false);
_connectivitySubscription?.cancel();
}
}
}