flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
597 stars 40 forks source link

improve seekToTimeInMilliseconds() #210

Closed michaelknoch closed 6 years ago

michaelknoch commented 6 years ago

Type of change: improvement

Motivation

We debounce seekToTimeInMilliseconds() to keep exoplayers seeking queue as clean as possible. This dramatically improves seeking speed in our case. It turns out that it would be nice to enforce the last seek is queued up in any case to improve seeking generally and fix some video bugs in our case.

Due to some type changes this depends on https://github.com/SwiftAndroid/swift-jni/pull/11

Current behavior

when debouncing seekToTimeInMilliseconds() the first seek in queue will be processed in any case.

Expected behavior

when debouncing seekToTimeInMilliseconds() the first and the last seek in queue will be processed in any case.

Please check if the PR fulfills these requirements