Commit 08698021 by olly Committed by Oliver Woodman

Show last seek position when playing an ad

We'd normally expect playback controls to be hidden during
ad playback, although if they are visible for whatever reason,
it makes sense to set the position to the current content
position now that we have it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161950098
parent 7b20e130
......@@ -755,8 +755,11 @@ public class PlaybackControlView extends FrameLayout {
}
duration = C.usToMs(durationUs);
position = C.usToMs(currentWindowTimeBarOffsetUs);
bufferedPosition = C.usToMs(currentWindowTimeBarOffsetUs);
if (!player.isPlayingAd()) {
bufferedPosition = position;
if (player.isPlayingAd()) {
position += player.getContentPosition();
bufferedPosition = position;
} else {
position += player.getCurrentPosition();
bufferedPosition += player.getBufferedPosition();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment