tkem / mopidy-mobile

Mopidy Web client extension and hybrid app for mobile devices
Apache License 2.0
78 stars 14 forks source link

Limit frequency of seeks when dragging progress bar? #168

Closed adamcik closed 8 years ago

adamcik commented 8 years ago

Could be that we should rate limit this in mopidy itself. But luckily for me when testing it's currently possible to drag the progress bar back and forth and trigger a ton of seeks. Might be nicer and give less "glitchy" sound if there was a minimum interval between seeks.

tkem commented 8 years ago

Agreed, but probably somewhat tricky to implement. So far, it worked reasonably well for me, so unless others complain... Patches welcome ;-)

tkem commented 8 years ago

Note also that it's already limited so that no new seek request will be sent unless the last one got a response. So not every JS drag event will result in a WebSocket request, which would really be flooding Mopidy.

tkem commented 8 years ago

So I think the current behavior is quite sane - send as many requests as sensible for maximum UI responsiveness, but don't flood Mopidy with more requests than it can handle. The round-trip between seek requests should also make it possible for Mopidy to queue/handle requests from other clients as well.