state property

String get state

Converts the processing state to a string state for backward compatibility

Implementation

String get state {
  switch (processingState) {
    case ProcessingState.idle:
      return 'idle';
    case ProcessingState.loading:
      return 'loading';
    case ProcessingState.buffering:
      return 'buffering';
    case ProcessingState.ready:
      return playing ? 'playing' : 'paused';
    case ProcessingState.completed:
      return 'completed';
    case ProcessingState.error:
      return 'error';
  }
}