@ray-js/ipc-player-integration 0.0.35 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,6 +91,10 @@ const BottomLeftContent = _ref => {
91
91
  setScrollResetKey(k => k + 1);
92
92
  setScrollLeft(0);
93
93
  setScrollTo(undefined);
94
+ scrollLeftRef.current = 0;
95
+ // 清零上一屏的测量值,避免用旧 clientWidth/contentWidth 在重新测量前误判溢出导致箭头闪现
96
+ setClientWidth(0);
97
+ setContentWidth(0);
94
98
  }, [screenType]);
95
99
 
96
100
  // 程序化滚动目标只在动画期间短暂受控,之后释放为非受控,避免回弹影响手动拖动
@@ -152,7 +156,10 @@ const BottomLeftContent = _ref => {
152
156
  timer = setTimeout(measure, 400);
153
157
  });
154
158
  };
155
- timer = setTimeout(measure, 200);
159
+
160
+ // 初次延时仅用于等布局沉降;切屏已清零旧测量值,不会用旧值误闪,
161
+ // 故首测尽量快(60ms)让箭头更早出现,后续仍按 400ms 轮询兜底异步内容撑开。
162
+ timer = setTimeout(measure, 60);
156
163
  return () => {
157
164
  if (timer) clearTimeout(timer);
158
165
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "IPC 融合播放器",
5
5
  "main": "lib/index",
6
6
  "files": [