Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

feat: up realtime and presences to 30 messages per second #618

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/presence-mouse/canvas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export class PointersCanvas extends BaseComponent {
...coordinates,
visible: !this.isPrivate,
});
}, 100);
}, 30);

private onMyParticipantMouseOut = (event: MouseEvent): void => {
const { x, y, width, height } = this.canvas.getBoundingClientRect();
Expand Down
2 changes: 1 addition & 1 deletion src/components/presence-mouse/html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class PointersHTML extends BaseComponent {
*/
private addListeners(): void {
this.pointerMoveObserver = fromEvent(this.container, 'pointermove')
.pipe(throttleTime(200))
.pipe(throttleTime(30))
.subscribe(this.onMyParticipantMouseMove);
this.container.addEventListener('pointerleave', this.onMyParticipantMouseLeave);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/realtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class Realtime extends BaseComponent {
}

this.room.emit('message', { name: event, payload: data });
}, 200);
}, 30);

/**
* @function subscribe
Expand Down
Loading