After setting mPlayer.usesExternalPlaybackWhileExternalScreenIsActive
to YES
in AVPlayerDemoPlaybackViewController of Apple's AVPlayerDemo sample project, how do you throttle the scrubbing so it doesn't lag behind on the AppleTV?
What I mean is that when you move the slider really fast back and forth the AppleTV performs each and every seekToTime
operation, but takes longer to do it then the user takes to slide.
One of the problems with the demo is it uses both the "Touch Drag Inside" and "Value Changed" events which causes it to send the same value twice. If you remove "Value Changed" it improves a bit, but still lags.
I've tried rounding to whole seconds and then only send seekToTime
when the second changes, but that doesn't seem to help as much. What I really need to do is send fewer commands the faster the user moves the slider, but more when the user moves slower.
Any ideas on how to accomplish this?