You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Is it possible to change the cue startTime? I am using this code to parse my cues, but they are out of synk, basically delayed:
track.addEventListener('cuechange', () => {
const activeCues = Array.from(track.activeCues);
const cue = activeCues[0];
// I want it to be smaller number so cue is active earlier.
let timestamp = cue.startTime;
});
My thoughts are as follows: because the cues are parsed earlier than they are presented, I can shift the start time. I found the configuration option hlsClientConf.cueHandler, but it is not documented. After looking inside src/utils/cues.ts, I’m not even sure if it’s possible to copy and adjust the code due to the imports.
UPD:
I was wrong. My cues are ID3MetadataCues so I think I need to modify the id3-track-controller.ts
UPD 2:
I found, I need to update function createCueWithDataFields from id3-track-controller.ts with something like this
let start = startTime - 0.25;
let end = start + 0.03;
let cue = new Cue(start, end, '')
The question now is it possible without creating the fork or patch but looks like no. Maybe someone could suggest a better apporach or some pitfalls of this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
Is it possible to change the cue startTime? I am using this code to parse my cues, but they are out of synk, basically delayed:
My thoughts are as follows: because the cues are parsed earlier than they are presented, I can shift the start time. I found the configuration option hlsClientConf.cueHandler, but it is not documented. After looking inside src/utils/cues.ts, I’m not even sure if it’s possible to copy and adjust the code due to the imports.
UPD:
I was wrong. My cues are ID3MetadataCues so I think I need to modify the id3-track-controller.ts
UPD 2:
I found, I need to update function createCueWithDataFields from id3-track-controller.ts with something like this
The question now is it possible without creating the fork or patch but looks like no. Maybe someone could suggest a better apporach or some pitfalls of this.
Beta Was this translation helpful? Give feedback.
All reactions