brim-borium / spotify_sdk

Flutter Package to connect the spotify sdk
https://pub.dev/packages/spotify_sdk
Apache License 2.0
153 stars 82 forks source link

Issue in Spotifysdk.subscribePlayerState not emitting frequently events inside StreamBuilder. #192

Closed Kaustubhs10 closed 1 year ago

Kaustubhs10 commented 1 year ago

!! Attention !! FILL IN ALL SECTIONS OF THIS TEMPLATE OR YOUR ISSUE WILL BE CLOSED WITHOUT INVESTIGATION This is a flutter package that wraps the native iOS and Android Spotify "remote" SDKs as well as the Spotify Web Playback SDK for web. Since it wraps the native SDKs it has the same features and limitations. Please use the search functionality in the native SDK repos to find corresponding issues before opening an issue here. If your issue is deriving from the native SDKs you should open an issue there and not in this repo.

Is this a how to question? No

Is this a native Spotify SDK issue? No

Have you searched for existing issues? Yes

Are you using a Free or Premium Spotify account? Free

Are you aware of the limitations of Free Spotify accounts? Yes If you answered "No" and you are using a Free account then you make sure that this is not behavior that intentionally limited by the native SDK.

Expected behavior Inside StreamBuilder where stream is SpotifySdk.subscribePlayerState() and it has to emitting events frequently to getting playback position for seekbar to track current song position.

Describe the bug Inside StreamBuilder where stream is SpotifySdk.subscribePlayerState() but it is not emitting new events frequently for playback positions which i want to use for seekbar to get current song positions. It only emit events for 2nd second or 9th seconds and then stops emitting new events.

Spotify_sdk Flutter package version spotify_sdk: ^2.3.1

Target Platform, Version & Device

Development OS

brim-borium commented 1 year ago

Hi @Kaustubhs10

This is not a bug in the Flutter Spotify SDK. This is identical to the behaviour of the underlying native SDKs. You can find a corresponding iOS SDK issue https://github.com/spotify/ios-sdk/issues/42

A possible workaround has been proposed in #66.

brim-borium commented 1 year ago

As this is an issue in the native sdk, we currently can't fix this