Skip to content

Commit

Permalink
Fix hour computation in the video player, fixes #36
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Berti committed Jul 4, 2023
1 parent 07c2c5b commit 4ecaa62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/lib/VideoFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ VideoFrame.prototype.toSMPTE = function(frame) {
var fps = this.frameRate;
function wrap(n) { return ((n < 10) ? '0' + n : n); }
var _hour = ((fps * 60) * 60), _minute = (fps * 60);
var _hours = (frameNumber / _hour).toFixed(0);
var _hours = Math.floor(frameNumber / _hour).toString();
var _minutes = (Number((frameNumber / _minute).toString().split('.')[0]) % 60);
var _seconds = (Number((frameNumber / fps).toString().split('.')[0]) % 60);
var SMPTE = (wrap(_hours) + ':' + wrap(_minutes) + ':' + wrap(_seconds) + ':' + wrap(Math.round(frameNumber % fps)));
Expand Down

0 comments on commit 4ecaa62

Please sign in to comment.