scanner: Upload frame every 2 seconds

This commit is contained in:
Fam Zheng 2025-02-15 12:12:08 +00:00
parent 3002595df4
commit 689571b260

View File

@ -366,8 +366,8 @@ Page({
},
handle_image_data_url(data_url) {
const now = Date.now();
const interval = 5000; // 5 seconds
if (now - this.data.last_frame_upload_time < interval) {
const interval_ms = 2000;
if (now - this.data.last_frame_upload_time < interval_ms) {
return;
}
this.setData({