UMediaConfig constructor
const
UMediaConfig({
- bool autoPlay = false,
- bool muted = false,
- double volume = 1,
- double speed = 1,
- URepeatMode repeat = URepeatMode.off,
- bool shuffle = false,
- UHwAccel hwAccel = UHwAccel.auto,
- int minBufferMs = 15000,
- int maxBufferMs = 50000,
- int bufferForPlaybackMs = 2500,
- int bufferForPlaybackAfterRebufferMs = 5000,
- int maxCacheBytes = 0,
- Duration positionUpdateInterval = const Duration(milliseconds: 250),
- UAudioFocusPolicy focusPolicy = UAudioFocusPolicy.exclusive,
- bool pauseOnBecomingNoisy = true,
- bool wakeLock = true,
- bool allowBackgroundPlayback = false,
- bool preloadNext = true,
- bool gapless = true,
- Duration? crossfade,
- String? preferredAudioLanguage,
- String? preferredSubtitleLanguage,
- bool subtitlesEnabled = true,
- int maxHeight = 0,
- int maxCellularHeight = 0,
- bool abrEnabled = true,
- int preferredHeight = 0,
- int retryLimit = 3,
- Duration retryDelay = const Duration(seconds: 2),
- Duration connectTimeout = const Duration(seconds: 15),
- 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,
});