fix(player): use append() instead of add(); update lastMessageTime inside distributeMessage
This commit is contained in:
parent
40e0296c8a
commit
d30b663195
4 changed files with 5 additions and 7 deletions
|
|
@ -30,7 +30,7 @@ ENV TZ=UTC \
|
|||
BEACON_SIZE_LIMIT=7000000 \
|
||||
KAFKA_USE_SSL=true \
|
||||
KAFKA_MAX_POLL_INTERVAL_MS=400000 \
|
||||
REDIS_STREAMS_MAX_LEN=3000 \
|
||||
REDIS_STREAMS_MAX_LEN=5000 \
|
||||
TOPIC_RAW_WEB=raw \
|
||||
TOPIC_RAW_IOS=raw-ios \
|
||||
TOPIC_CACHE=cache \
|
||||
|
|
|
|||
|
|
@ -142,8 +142,6 @@ export default class MessageDistributor extends StatedScreen {
|
|||
while (next = r.next()) {
|
||||
const [msg, index] = next
|
||||
this.distributeMessage(msg, index)
|
||||
this.lastMessageTime = Math.max(msg.time, this.lastMessageTime)
|
||||
|
||||
msgs.push(msg)
|
||||
}
|
||||
|
||||
|
|
@ -296,6 +294,7 @@ export default class MessageDistributor extends StatedScreen {
|
|||
|
||||
/* Binded */
|
||||
distributeMessage(msg: Message, index: number): void {
|
||||
this.lastMessageTime = Math.max(msg.time, this.lastMessageTime)
|
||||
if ([
|
||||
"mouse_move",
|
||||
"mouse_click",
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default class DOMManager extends ListWalker<Message> {
|
|||
return this.startTime;
|
||||
}
|
||||
|
||||
add(m: Message): void {
|
||||
append(m: Message): void {
|
||||
switch (m.tp) {
|
||||
case "set_node_scroll":
|
||||
if (!this.nodeScrollManagers[ m.id ]) {
|
||||
|
|
@ -155,13 +155,12 @@ export default class DOMManager extends ListWalker<Message> {
|
|||
this.insertNode(msg);
|
||||
return
|
||||
case "create_element_node":
|
||||
// console.log('elementnode', msg)
|
||||
if (msg.svg) {
|
||||
this.nl[ msg.id ] = document.createElementNS('http://www.w3.org/2000/svg', msg.tag);
|
||||
} else {
|
||||
this.nl[ msg.id ] = document.createElement(msg.tag);
|
||||
}
|
||||
if (this.bodyId === msg.id) {
|
||||
if (this.bodyId === msg.id) { // there are several bodies in iframes TODO: optimise & cache prebuild
|
||||
this.postponedBodyMessage = msg;
|
||||
} else {
|
||||
this.insertNode(msg);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export default class PerformanceTrackManager extends ListWalker<PerformanceTrack
|
|||
private prevNodesCount: number = 0;
|
||||
|
||||
|
||||
add(msg: PerformanceTrack):void {
|
||||
append(msg: PerformanceTrack):void {
|
||||
let fps: number | undefined;
|
||||
let cpu: number | undefined;
|
||||
if (!this.isHidden && this.prevTime != null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue