betterplayer
betterplayer copied to clipboard
Audio stopping after a few minutes (5-10) on lock screen [BUG]
History check ok.
Describe the bug After a few minutes of listening to the audio with the screen locked, the audio suddenly stops. When unlocking the screen and returning to the app the process is still running. Then it is necessary to pause the video and play again.
To Reproduce
- play video
- lock sreen
- await some minutes (5-10)
- See error
*Example code
BetterPlayerConfiguration( aspectRatio: 16 / 9, autoPlay: false, startAt: Duration(seconds: widget.lesson?.currentTime?.toInt() ?? 0), deviceOrientationsAfterFullScreen: [ DeviceOrientation.portraitUp, ], handleLifecycle: false, autoDetectFullscreenDeviceOrientation: true, ), betterPlayerDataSource: BetterPlayerDataSource( BetterPlayerDataSourceType.network, widget.lesson?.videoInformation?.files?.last.link ?? '', notificationConfiguration: BetterPlayerNotificationConfiguration( showNotification: true, title: widget.lesson?.title, author: widget.lesson?.courseTrail?.title, imageUrl: IFileStorageRepository.imagePath(widget.lesson?.thumbnailFileUUID ?? ''), ), bufferingConfiguration: BetterPlayerConfig.buffer, cacheConfiguration: BetterPlayerConfig.cache, ), );
and
` class BetterPlayerConfig { static const buffer = BetterPlayerBufferingConfiguration( minBufferMs: 50000, maxBufferMs: 13107200, bufferForPlaybackMs: 2500, bufferForPlaybackAfterRebufferMs: 5000, );
static const cache = BetterPlayerCacheConfiguration( useCache: true, preCacheSize: 10 * 1024 * 1024, maxCacheSize: 10 * 1024 * 1024, maxCacheFileSize: 10 * 1024 * 1024,
///Android only option to use cached video between app sessions
key: "testCacheKey",
); } `
Expected behavior adjust the error
Screenshots it's not necessary
Flutter doctor it's all ok
Better Player version
- Version: ^0.0.83
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]- all devices
- OS: [e.g. iOS8.1] - all devices
Hello. I'm experiencing the same problem! On Android only.
Same problem here...