Milliseconds trim bug in videoeditor-workflowoperation formatTime() javaScript

Steps to reproduce

Steps to reproduce:
1. In the video editor, select a time point cut after a few minutes into the video.

Actual Results: the milliseconds calculation is off
Expected Results: the milliseconds calculation is on

Workaround (if any): Accept the trim being off by a few milliseconds

Activity

Show:
Former user
August 15, 2017, 2:22 AM

./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/editor.js- if (!isNaN(seconds) && (seconds >= 0)) {
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/editor.js- var tmpH = Math.floor(seconds / 3600);
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/editor.js- var tmpM = Math.floor((seconds - (tmpH * 3600)) / 60);
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/editor.js- var tmpS = Math.floor(seconds - (tmpH * 3600) - (tmpM * 60));
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/editor.js: var tmpMS = seconds - tmpS;

./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.mhPlayer.js- if (!isNaN(seconds) && (seconds >= 0)) {
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.mhPlayer.js- var tmpH = Math.floor(seconds / 3600);
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.mhPlayer.js- var tmpM = Math.floor((seconds - (tmpH * 3600)) / 60);
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.mhPlayer.js- var tmpS = Math.floor(seconds - (tmpH * 3600) - (tmpM * 60));
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.mhPlayer.js: var tmpMS = seconds - tmpS;

./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.timefield.js- if (!isNaN(seconds) && (seconds >= 0)) {
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.timefield.js- var tmpH = Math.floor(seconds / 3600);
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.timefield.js- var tmpM = Math.floor((seconds - (tmpH * 3600)) / 60);
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.timefield.js- var tmpS = Math.floor(seconds - (tmpH * 3600) - (tmpM * 60));
./matterhorn-videoeditor-workflowoperation/src/main/resources/ui/operation/editor/js/jquery/jquery.timefield.js: var tmpMS = seconds - tmpS;

The tmpMS should remove minutes and hours in addition to seconds:
var tmpMS = seconds - (tmpH * 60 * 60) - (tmpM * 60) - tmpS;

Stephen Marquard
August 16, 2017, 9:22 PM

Do I sense a PR coming soon?

Former user
August 16, 2017, 9:40 PM

Yes, it's way up on my todo list!

Fixed and reviewed

Assignee

Former user

Reporter

Former user

Severity

Data Loss/Corruption

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Minor