Adobe CEP jsx takes, seconds with frames, so perhaps need to convert the autoEdit json word timecode that is just in seconds to that format or round up the milliseconds.
function secondsToFrames(time){
var buffer = 3 // amount of frames to jump before the start of the word to make it a little less abrupt
let fps = 25;
var base = Math.floor(time)
var fraction = time - base
var frames = Math.floor(fps * fraction) - buffer
if (frames < 1){
frames = fps + frames
base -= 1;
}
return String(base) + '.' + String(frames)
}
Describe the bug
Word to time correspondence in Transcription to Adobe CEP Panel seems to be off.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Expect that when click on a word, it loads clip in source monitor, and move playhead to corresponding timecode.
Screenshots If applicable, add screenshots or screenrecording/gif to help explain your problem.
Desktop (please complete the following information):
1.0.12
(1.0.1 Panel)Additional context
examining the transcription json to see what words are not "working", found that this works:
But this doesn't
Adobe CEP jsx takes, seconds with frames, so perhaps need to convert the autoEdit json word timecode that is just in seconds to that format or round up the milliseconds.
see function in documentation
secondsToFrames