toggle method
void
toggle(
- FijkPlayer? player
视频切换
Implementation
void toggle(FijkPlayer? player) {
if (player?.state == FijkState.started) {
player?.pause();
CloudEBus.instance.dispatch("playIconSetting", params: true);
} else if (player?.state == FijkState.prepared ||
player?.state == FijkState.paused ||
player?.state == FijkState.completed) {
player?.start();
CloudEBus.instance.dispatch("playIconSetting", params: false);
}
}