Fix issue where the first message of the playback may not be displayed on the restreamer page

mike/shorts
ElementalAlchemist 2 years ago committed by Mike Lang
parent ea0729cbd6
commit 262a293d2e

@ -296,6 +296,10 @@ function updateChatRender() {
lastChatIndex = Math.floor((rangeMin + rangeMax) / 2); lastChatIndex = Math.floor((rangeMin + rangeMax) / 2);
} }
if (lastChatIndex === 0 && globalChatData[0].when > lastAddedTime) {
lastChatIndex = -1;
}
for (let chatIndex = lastChatIndex + 1; chatIndex < globalChatData.length; chatIndex++) { for (let chatIndex = lastChatIndex + 1; chatIndex < globalChatData.length; chatIndex++) {
const chatMessage = globalChatData[chatIndex]; const chatMessage = globalChatData[chatIndex];
if (chatMessage.when > videoDateTime) { if (chatMessage.when > videoDateTime) {

Loading…
Cancel
Save