flutter_ijkplayer icon indicating copy to clipboard operation
flutter_ijkplayer copied to clipboard

player should not play, if app in pause mode and also should not player play if app in background.

Open vitulgoyani opened this issue 5 years ago • 3 comments

player should not play, if app in pause mode and also should not player play if app in background.

vitulgoyani avatar Nov 13 '19 13:11 vitulgoyani

This should be determined by your business logic rather than the library.

You should use the plugin or api with the app lifecycle to stop/start playing resources.

CaiJingLong avatar Nov 13 '19 14:11 CaiJingLong

Because I have seen many applications need play resource in background.

CaiJingLong avatar Nov 13 '19 14:11 CaiJingLong

I have same issue. I use the app life cycle and it works fine if the video is already initialize. However if the video is still preparing I can't pause it.

@override void didChangeAppLifecycleState(AppLifecycleState state) async { if (state == AppLifecycleState.paused) { // controller.reset(); // await controller.stop(); await controller.pause(); } super.didChangeAppLifecycleState(state); }

If the video is not ready and user pause the app (app in background) the video get prepared and the play. Is there any suggestion for this problem?

Aljabri-Salman avatar Mar 18 '20 11:03 Aljabri-Salman