diff --git a/README.md b/README.md index 9aee9a7..1d626fb 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,8 @@ To run the tests in a browser environment, open the `test/smpte-timecode-test.ht in a browser. ## Update History +- 1.3.6 + - fix for #42 - 59.94 and 29.97 non-drop-frame timecodes would not initialize properly - 1.3.5 - packaging fix - 1.3.4 diff --git a/package.json b/package.json index 85002cc..ba28b4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "smpte-timecode", - "version": "1.3.5", + "version": "1.3.6", "description": "JavaScript implementation of SMPTE timecode type", "main": "smpte-timecode.js", "scripts": { diff --git a/smpte-timecode.js b/smpte-timecode.js index 92dd9ca..e617671 100644 --- a/smpte-timecode.js +++ b/smpte-timecode.js @@ -46,7 +46,7 @@ // we got a fractional, we'll assume it's a 29.97, 23.98, 59.94 or something of the sort this.frameRateNum = frameRateRound*1000; this.frameRateDen = 1001; - if (frameRateRound != 24) this.dropFrame = true; + if (frameRateRound != 24 && typeof(dropFrame) !== 'boolean') this.dropFrame = true; } } break; diff --git a/test/smpte-timecode-test.js b/test/smpte-timecode-test.js index 5c88800..2f988ab 100644 --- a/test/smpte-timecode-test.js +++ b/test/smpte-timecode-test.js @@ -292,4 +292,10 @@ describe('Issues', function() { expect(t.frameCount).to.be(2112); expect(Timecode('12:34:56:578',600).toString()).to.be('12:34:56:578'); }); + + it ('#42 59.94 NDF Time Codes', function(){ + var t = new Timecode(123456, 59.95, false); + expect(t.dropFrame).to.be(false); + }); + });