play method

  1. @override
Future<void> play([
  1. int delay = 0
])
override

Plays a single run of the given file, with a given volume.

Implementation

@override
Future<void> play([int delay = 0]) async{
		if (_hasStarted && isPlaying) {
			console.warning( 'Audio: Audio is already playing.' );
			return;
		}

  _hasStarted = true;

		if(!hasPlaybackControl){
			console.warning( 'Audio: this Audio has no playback control.' );
			return;
		}
  if(delay == 0){
    replay();
  }
  else{
    Future.delayed(Duration(milliseconds: delay),replay);
  }
}