SRGSSR / srgmediaplayer-apple

An advanced media player library, simple and reliable
MIT License
158 stars 33 forks source link

Add tolerances for playback methods with start time #52

Closed defagos closed 6 years ago

defagos commented 6 years ago

Specifying an exact start time makes playback startup slower, which is not always what we want. We should add tolerance parameters (like for seeks) to let applications decide whether they want playback startup to be precise (at the expense of startup time) or it the startup position can be less precise (improving startup time).

There is only one specific requirement which needs to be taken into account: No matter the precision, starting playback within a segment must ensure that the initial playback position stays within the segment. The tolerance must therefore be adjusted depending on the initial target position within a segment.

Some unit tests need to be written as well to cover these specific cases.

defagos commented 6 years ago

Added to version 2.5.