brim-borium/spotify_sdk

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

Closed this issue · 2 comments

!! 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

  • OS & Version: [e.g. iOS 16, Android 12]
  • Device: [ iPhone 11, Moto g60]

Development OS

  • OS: [e.g. Mac OS,]

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 spotify/ios-sdk#42

A possible workaround has been proposed in #66.

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