play method
Play the current media.
If the the player is opening a media file, calling this method will set autoplay to true.
Implementation
bool play() {
if (!disposed) {
if (id.value != null && playbackState.value == PlaybackState.paused) {
_methodChannel.invokeMethod('play', id.value);
playbackState.value = PlaybackState.playing;
return true;
} else if (!autoPlay.value &&
playbackState.value == PlaybackState.closed &&
_source != null) {
setAutoPlay(true);
return true;
}
}
return false;
}