betterplayer icon indicating copy to clipboard operation
betterplayer copied to clipboard

Audio stopping after a few minutes (5-10) on lock screen [BUG]

Open rafaelqcosta opened this issue 2 years ago • 7 comments

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

  1. play video
  2. lock sreen
  3. await some minutes (5-10)
  4. 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

rafaelqcosta avatar Jun 17 '22 11:06 rafaelqcosta

Hello. I'm experiencing the same problem! On Android only.

renatolealdev avatar Jun 29 '22 19:06 renatolealdev

Same problem here...

tuvia avatar Jul 24 '22 03:07 tuvia