Commit 464e7d98 authored by lvtz's avatar lvtz

fix 语音点评延迟问题

parent 1c5a56c6
......@@ -707,12 +707,12 @@ Page({
if(currentPoint){
that.playTimeOut = setTimeout(() => {
fn(currentPoint);
}, currentPoint.t - pretimestamp);
}, currentPoint.t - pretimestamp - 1);
}
}
that.playTimeOut = setTimeout(() => {
fn(currentPoint);
}, currentPoint.t - that.data.pretimestamp)
}, currentPoint.t - that.data.pretimestamp - 1)
};
......
......@@ -453,12 +453,13 @@ Page({
if(currentPoint){
that.playTimeOut = setTimeout(() => {
fn(currentPoint);
}, currentPoint.t - that.data.pretimestamp);
}, currentPoint.t - that.data.pretimestamp - 1);
// 这里减1,能有效降低绘制延迟 (没有依据,估计是计算时间有时间起始点叠加,所以时间越久延迟越大)
}
}
that.playTimeOut = setTimeout(() => {
fn(currentPoint);
}, currentPoint.t - that.data.pretimestamp)
}, currentPoint.t - that.data.pretimestamp - 1)
};
},
actionmake (point) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment