UMediaConfig constructor

const UMediaConfig({
  1. bool autoPlay = false,
  2. bool muted = false,
  3. double volume = 1,
  4. double speed = 1,
  5. URepeatMode repeat = URepeatMode.off,
  6. bool shuffle = false,
  7. UHwAccel hwAccel = UHwAccel.auto,
  8. int minBufferMs = 15000,
  9. int maxBufferMs = 50000,
  10. int bufferForPlaybackMs = 2500,
  11. int bufferForPlaybackAfterRebufferMs = 5000,
  12. int maxCacheBytes = 0,
  13. Duration positionUpdateInterval = const Duration(milliseconds: 250),
  14. UAudioFocusPolicy focusPolicy = UAudioFocusPolicy.exclusive,
  15. bool pauseOnBecomingNoisy = true,
  16. bool wakeLock = true,
  17. bool allowBackgroundPlayback = false,
  18. bool preloadNext = true,
  19. bool gapless = true,
  20. Duration? crossfade,
  21. String? preferredAudioLanguage,
  22. String? preferredSubtitleLanguage,
  23. bool subtitlesEnabled = true,
  24. int maxHeight = 0,
  25. int maxCellularHeight = 0,
  26. bool abrEnabled = true,
  27. int preferredHeight = 0,
  28. int retryLimit = 3,
  29. Duration retryDelay = const Duration(seconds: 2),
  30. Duration connectTimeout = const Duration(seconds: 15),
  31. UMediaLogLevel logLevel = UMediaLogLevel.error,
})

Implementation

const UMediaConfig({
  this.autoPlay = false,
  this.muted = false,
  this.volume = 1,
  this.speed = 1,
  this.repeat = URepeatMode.off,
  this.shuffle = false,
  this.hwAccel = UHwAccel.auto,
  this.minBufferMs = 15000,
  this.maxBufferMs = 50000,
  this.bufferForPlaybackMs = 2500,
  this.bufferForPlaybackAfterRebufferMs = 5000,
  this.maxCacheBytes = 0,
  this.positionUpdateInterval = const Duration(milliseconds: 250),
  this.focusPolicy = UAudioFocusPolicy.exclusive,
  this.pauseOnBecomingNoisy = true,
  this.wakeLock = true,
  this.allowBackgroundPlayback = false,
  this.preloadNext = true,
  this.gapless = true,
  this.crossfade,
  this.preferredAudioLanguage,
  this.preferredSubtitleLanguage,
  this.subtitlesEnabled = true,
  this.maxHeight = 0,
  this.maxCellularHeight = 0,
  this.abrEnabled = true,
  this.preferredHeight = 0,
  this.retryLimit = 3,
  this.retryDelay = const Duration(seconds: 2),
  this.connectTimeout = const Duration(seconds: 15),
  this.logLevel = UMediaLogLevel.error,
});