Open soniacq opened 2 years ago
Linking this issue
Just wanted to update on this issue. The way that this can be fixed is:
// how to convert timestamp to millisecond epoch
const timestamp2ms = t => parseInt(t.split('-'))
// get the timestamps for the main camera and another stream
// using the main camera as the time reference for the progress bar
const mainStartTime = timestamp2ms(recordingData.streams.main['first-entry-id'])
const gllStartTime = timestamp2ms(recordingData.streams.gll['first-entry-id'])
// then when you want the exact gll time,
// you can calculate the exact time offset like this and add it to the time in seconds
const gllCurrentTime = Math.max(0, mainCurrentTime + (mainStartTime - gllStartTime) / 1000)
If you have the progress bar feed the absolute timestamp (add mainStartTime to the current time in seconds) and then provide each video player with their stream's start time, then you can just do the math when seeking
Looks at the
coffee-test-2
, as an example. The audio length is 7:19 min. However, the video length is 7:20 min