Closed fawni closed 4 months ago
Since 2.6.0 this function has been changed to:
/**
* Converts time and duration integers into snowflake timestamps
* @param {Number} elementTime Current element time seconds
* @param {Number} elementDuration Element duration seconds
*/
getTimestamps(elementTime: number, elementDuration: number) {
const startTime = Math.floor(Date.now() / 1000) - elementTime,
endTime = startTime + elementDuration;
return [startTime, endTime];
}
returns the correct start timestamp in
getTimestamps
method.the previous way sets the current time as the start timestamp which makes discord believe that media just started playing. discord already checks the current time and compares it with the timestamps available.
here's the difference to further clarify:
note that discord currently does not render the shown timestamp bar by default so this is not much of an issue as of now, but this might change in the future.