state property

Current playback state.

Implementation

PlaybackState get state => _state;
void state=(PlaybackState value)

Set playback state to start, pause and stop the media. https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setstateplaybackstate-value

Implementation

set state(PlaybackState value) {
  _state = value;
  _player.ref.setState.asFunction<void Function(Pointer<mdkPlayer>, int)>()(
      _player.ref.object, value.rawValue);
  if (_state == PlaybackState.stopped) {
    _videoSize = Completer<ui.Size?>();
  }
}