Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jump/seek API for the Player class #821

Closed
Tracked by #696
MichaelOrlov opened this issue Jul 14, 2021 · 0 comments · Fixed by #826
Closed
Tracked by #696

Add jump/seek API for the Player class #821

MichaelOrlov opened this issue Jul 14, 2021 · 0 comments · Fixed by #826
Assignees
Labels
enhancement New feature or request

Comments

@MichaelOrlov
Copy link
Contributor

MichaelOrlov commented Jul 14, 2021

Description

This feature is part of the #696
According to the design jump/seek API suppose to allow jump back or forward to an arbitrary point in time during playback.
During the jump, messages lying in the interval between current timestamp and target time point should not be published.

Related Issues

Completion Criteria

    • jump/seek API able to jump forward to an arbitrary time point during active playback.
    • jump/seek API able to jump forward to an arbitrary time point when player in pause mode.
    • jump/seek API able to jump backward to an arbitrary time point during active playback.
    • jump/seek API able to jump backward to an arbitrary time point when player in pause mode.

Implementation Notes / Suggestions

We can use the same mechanism for taking over playback as we do in play_next() API, however updating internal message queue is going to be tricky part.
Also it could be a few nasty race conditions related to the adjustment of the reader position during active playback. Will need to call close-open for reader from separate thread to be able adjust reader position when jumping back in time.

Testing Notes / Suggestions

Perhaps it would be able to write non-flaky tests using MockReader and MockPlayerClock classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant