|
@@ -1642,9 +1642,12 @@ watch(
|
|
|
// 当在播放中暂停 执行这个方法
|
|
|
if (!state.playEnd && state.playState === "paused") {
|
|
|
moveTranslateXNum(0)
|
|
|
- const scrollLeft = smoothAnimationState.osdmScrollDom!.scrollLeft
|
|
|
- smoothAnimationState.osdmScrollDom!.scrollLeft = scrollLeft + smoothAnimationState.translateXNum
|
|
|
- smoothAnimationState.translateXNum = 0
|
|
|
+ // 因为safari浏览器scrollWidth的值一直变化,scrollLeft + smoothAnimationState.translateXNum 为最大宽度的时候,实际上scrollLeft滚不到最大宽度,所以在下一帧处理滚动,能滚动到最大滚动位置
|
|
|
+ requestAnimationFrame(() => {
|
|
|
+ const scrollLeft = smoothAnimationState.osdmScrollDom!.scrollLeft
|
|
|
+ smoothAnimationState.osdmScrollDom!.scrollLeft = scrollLeft + smoothAnimationState.translateXNum
|
|
|
+ smoothAnimationState.translateXNum = 0
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|