Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- 'use strict';
- /**
- * Useful when viewer enters a room after a video was supposed to have started.
- * Need to apply Math.floor, otherwise Blink throws an error regarding non-finite numbers.
- * Result is then used to set the currentTime on video player.
- * @param {float} - caseTime
- * @param {float} - currentTime
- * @returns {float} - Result Diff b/t nCaseTime, which is set in the Update() method of each room, & nCurrentTime.get().
- */
- var nTimeDiff = function (caseTime, currentTime) {
- var floorCurrentTime = Math.floor(currentTime);
- var floorCaseTime = Math.floor(caseTime);
- var result = floorCurrentTime - floorCaseTime;
- return result;
- };
- // DOES NOT SHOW PARAMS OR COMMENTS
- nTimeDiff(timeOne, timeTwo);
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement