Skip to content

Commit

Permalink
Version 38:
Browse files Browse the repository at this point in the history
* Initial playback position is now correctly handled when the player is configured to play in reverse.
  • Loading branch information
bp2008 committed Jul 1, 2018
1 parent 30a2a0c commit 1d500ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ui3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
};
</script>
<script type="text/javascript">
var ui_version = "37";
var ui_version = "38";
var bi_version = "%%VERSION%%";
var combined_version = ui_version + "-" + bi_version;
//if (!!navigator.userAgent.match(/ Android /))
Expand Down
8 changes: 8 additions & 0 deletions ui3/ui3.js
Original file line number Diff line number Diff line change
Expand Up @@ -9355,6 +9355,8 @@ function JpegVideoModule()
if (loading.isLive)
startPaused = false;
Activate();
if (playbackControls.GetPlayReverse())
offsetPercent = 1;
clipPlaybackPosition = Clamp(offsetPercent, 0, 1) * (loading.msec - 1);
timeLastClipFrame = Date.now();
if (startPaused)
Expand Down Expand Up @@ -9432,7 +9434,11 @@ function JpegVideoModule()

var clipData = clipLoader.GetClipFromId(loading.uniqueId);
if (honorAlertOffset && clipData != null)
{
clipPlaybackPosition = clipData.offsetMs; // This offset is where the alert begins within the clip.
if (playbackControls.GetPlayReverse()) // If playing in reverse, lets start at the end of the alert's bounds.
clipPlaybackPosition += clipData.roughLengthMs;
}
honorAlertOffset = false;

if (clipPlaybackPosition < 0)
Expand Down Expand Up @@ -9785,6 +9791,8 @@ function FetchH264VideoModule()
startPaused = false;
Activate();
lastStatusBlock = null;
if (playbackControls.GetPlayReverse())
offsetPercent = 1;
currentSeekPositionPercent = Clamp(offsetPercent, 0, 1);
lastFrameAt = performance.now();
currentImageDateMs = Date.now();
Expand Down

0 comments on commit 1d500ec

Please sign in to comment.