@xmov/avatar 2.4.0-beta.3 → 2.4.0-beta.4
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.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -643,6 +643,9 @@ export default class XmovAvatar {
|
|
|
643
643
|
this.pendingInvisibleMode = true;
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
+
// Session 请求和资源下载期间也需要处理页面刷新。
|
|
647
|
+
window.addEventListener('beforeunload', this.handleBeforeUnload);
|
|
648
|
+
|
|
646
649
|
// 加载资源(sdk.resource_load:资源包下载/解析耗时)
|
|
647
650
|
(window as any).performanceTracker.markStart(performanceConstant.load_resource);
|
|
648
651
|
(window as any).performanceTracker.markStart(performanceConstant.first_avatar_render);
|
|
@@ -675,7 +678,6 @@ export default class XmovAvatar {
|
|
|
675
678
|
// 设置上报使用ttsa
|
|
676
679
|
(window as any).performanceTracker.setReportFunc(this.ttsa);
|
|
677
680
|
|
|
678
|
-
window.addEventListener('beforeunload', this.handleBeforeUnload);
|
|
679
681
|
document.addEventListener('visibilitychange', this.boundVisibilityChange);
|
|
680
682
|
initSpan?.end();
|
|
681
683
|
return sessionInfo;
|