-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Seek to default live does not restore idealTargetLiveOffset #11050
Comments
Any calls that issue a `seekTo()` where the position is `TIME_UNSET` will now restore the live offset target to the MediaItem set default. The code handles an intra-period seek in the same timeline by simply updating or removing the `setTargetLiveOffsetOverrideUs()`. Other cases call the original code. This fixes issue google#11050
@tonihei I'm guessing this is all yours. The feature works mostly great for us but this fix is a must. Here's the branch that has the debug logging: https://github.com/TiVo/ExoPlayer/tree/x-debug-for-issue-11050 I'll open a pull request with this possible fix (it works for all our uses cases): https://github.com/TiVo/ExoPlayer/tree/p-fix-for-issue-11050 Thanks! |
Pull request #11051 fixes the issue for us. All the test cases pass w or w/o the fix so not covered. Let me know if the fix is ok I can have someone update test cases and add them to the pull request. |
@marcbaechinger Thanks for taking this on, the substantial population of our installed base is watching live, HLS, with ExoPlayer so this is an important new feature for us! Thanks for the excellent first implementation. There are a couple of uses cases we see, even without low-latency:
Both of these use cases prefer that live adjustment can be turned off when a seek (or fast playback) moves the target position away from the minimal glass-to-glass time live point, perhaps we can talk about either automating this (we are using calls to Anyway I can help out please ask here. |
Thanks Steve for the background! I commented in the PR. I think we can provide this with a bit less duplication before I go into the internal review with your change! BTW: If you are ok with the suggestion I can apply this internally (still keeping your credits for the PR ofc). No need for you to update the pull request again. Would appreciate that you test this with your app first though to make sure the suggested change is equivalent to yours. |
Any calls that issue a `seekTo()` where the position is `TIME_UNSET` will now restore the live offset target to the MediaItem set default. The code handles an intra-period seek in the same timeline by simply updating or removing the `setTargetLiveOffsetOverrideUs()`. Other cases call the original code. This fixes issue google#11050
Any calls that issue a `seekTo()` where the position is `TIME_UNSET` will now restore the live offset target to the MediaItem set default. The change simply passes a flag to `updatePlaybackSpeedSettingsForNewPeriod()` that indicates the call is from a seek operation. If this flag is set, a `positionForTargetOffsetOverrideUs` of `TIME_UNSET` unconditionally removes the `setTargetLiveOffsetOverrideUs()` This fixes issue google#11050
Thanks @marcbaechinger. I tested the change and forced pushed the single commit. It works just the same (logic is same), but the code is cleaner all going through the same method. I rebased before updating, so I picked up @tonihei 's fix for #10882 . I will back port his changes and this code to our 2.15.1 based release so we are running with the same code. |
@marcbaechinger I'm looking at fixes for the initial seeks before prepare, ran across this bug. We have updated our fix to match what is in dev-v2 and both work, so I am closing this bug :-) |
ExoPlayer Version
2.18.4
Devices that reproduce the issue
Devices that do not reproduce the issue
None I'm aware of.
Reproducible in the demo app?
Yes
Reproduction steps
LiveConfiguration
setTargetLiveOffsetOverrideUs()
is called to move the target (not sure why this is a feature, IMO live adjustment should shut off here until seek back to live edge)seekTo(C.TIME_UNSET)
(from the UI play next button with no next item will do this.Expected result
Live adjustment resumes (continues) using the original target set on playback startup (
mediaConfigurationTargetLiveOffsetUs
)Actual result
Playback seeks to the live edge, but Live adjustment desperately tries to move back to the last non default seek.
Logging shows clearly what is happening:
Step 1 - normal startup and live adjustment
Step 2 - three back button presses jump back 15 seconds total, override is called (
setTargetLiveOffsetOverrideUs()
)Step 3 - seek default is executed (prepare() will do this as well), notice
setTargetLiveOffsetOverrideUs(C.TIME_UNSET)
is not called so adjustment reverses trying (incorrectly) to slow down to the old seek positionMedia
Will send a live test stream to the developer email.
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.The text was updated successfully, but these errors were encountered: