toMap method

Map<String, Object?> toMap()

Implementation

Map<String, Object?> toMap() {
  final conf = <String, Object?>{
    'currentTime': currentTime,
    'duration': duration,
    'ended': ended,
    'fullscreen': fullscreen,
    'livestream': livestream,
    'label': label,
    'loop': loop,
    'mediaType': mediaType?.name,
    'muted': muted,
    'paused': paused,
    'pictureInPicture': pictureInPicture,
    'playerType': playerType,
    'playbackRate': playbackRate,
    'quality': quality,
    'volume': volume,
  };
  conf.removeWhere((key, value) => value == null);
  return conf;
}