media-kit / media-kit

A cross-platform video player & audio player for Flutter & Dart.
https://github.com/media-kit/media-kit
MIT License
1.16k stars 192 forks source link

Main branch pauses videos when app background #970

Open kalismeras61 opened 1 month ago

kalismeras61 commented 1 month ago

Yesterday i used main branch and now i am seeing videos pauses when put app in background.

Is it related to latest changes ?

alexmercerind commented 1 month ago

Hi @kalismeras61,

The videos were always meant to pause in background on Android & iOS. We have an option to configure it:

https://github.com/media-kit/media-kit/blob/88c49c6c0f6187a131a4053f0f1a3a42f2922a8a/media_kit_video/lib/src/video/video_texture.dart#L129-L130

I can think further if you specify your platform.

kalismeras61 commented 1 month ago

I was testing IOS it was working fine before but yesterday i wanted to use main branch but seems it is not working.

this.pauseUponEnteringBackgroundMode = false this.resumeUponEnteringForegroundMode = true,

Above one is correct for working background and still keeps playing on foreground?

alexmercerind commented 1 month ago

Yes. It should work.

The flag resumeUponEnteringForegroundMode is not considered if pauseUponEnteringBackgroundMode is false.

alexmercerind commented 1 month ago

Do share any update.

kalismeras61 commented 1 month ago

Do share any update.

Tested an seems not working!. Now reverted back to pub.dev version