Sithira / FlutterRadioPlayer

Flutter Radio Player, A Plugin to handle streaming audio without a hassle
BSD 3-Clause "New" or "Revised" License
137 stars 63 forks source link

FRPCoreService has not been initialized yet #81

Open netmindz opened 1 year ago

netmindz commented 1 year ago

I have tried to take your example app, but I'm having issues where the play controls get out of sync.

For example, if i press stop, then play i get the attached error log.txt

Sithira commented 1 year ago

Can you check with the new update ?

netmindz commented 1 year ago

I might also try https://github.com/Sithira/FlutterRadioPlayer/pull/78 to see if the changes made to fix the initialization of the player resolves my issue

Also, did you see my PR for the compile error?

netmindz commented 1 year ago

The same issue remains with 2.0.2

jorge-cuervo commented 1 year ago

I have the same problem, when I hit stop it sends me an error

Russsgithub commented 11 months ago

@Sithira , relating to this issue.

It states in the readme

stop() - Will stop all the streaming audio streams and detaches itself from FOREGROUND SERVICE. You need to reinitialize to use the plugin again,

How do i do this.

I've tried using

widget.flutterRadioPlayer.initPlayer();

but have no luck , It looks as if the initialization is done at onCreate().

Any chance you could add to the readme to explain how to re-initialize the player after stop() has been called. I'm reluctant to use pause() and leave the player pulling data as users may leave this for potentially long periods before listening again.

Thanks for the library, it works well for me apart from this.