diff --git a/docs/recipes/customize-replayer.md b/docs/recipes/customize-replayer.md index de2bcec851..a066f19970 100644 --- a/docs/recipes/customize-replayer.md +++ b/docs/recipes/customize-replayer.md @@ -53,17 +53,17 @@ And there are some ways to listen rrweb-player's state: ```js // get current timing rrwebPlayer.addEventListener('ui-update-current-time', (event) => { - console.log(event.detail.payload); + console.log(event.payload); }); // get current state rrwebPlayer.addEventListener('ui-update-player-state', (event) => { - console.log(event.detail.payload); + console.log(event.payload); }); // get current progress rrwebPlayer.addEventListener('ui-update-progress', (event) => { - console.log(event.detail.payload); + console.log(event.payload); }); ``` diff --git a/docs/recipes/customize-replayer.zh_CN.md b/docs/recipes/customize-replayer.zh_CN.md index e0db0d2739..7d76e2ab33 100644 --- a/docs/recipes/customize-replayer.zh_CN.md +++ b/docs/recipes/customize-replayer.zh_CN.md @@ -53,17 +53,17 @@ rrwebPlayer.goto(3000); ```js // 当前播放时间 rrwebPlayer.addEventListener('ui-update-current-time', (event) => { - console.log(event.detail.payload); + console.log(event.payload); }); // 当前播放状态 rrwebPlayer.addEventListener('ui-update-player-state', (event) => { - console.log(event.detail.payload); + console.log(event.payload); }); // 当前播放进度 rrwebPlayer.addEventListener('ui-update-progress', (event) => { - console.log(event.detail.payload); + console.log(event.payload); }); ``` diff --git a/guide.md b/guide.md index a8fb804509..87fc47004c 100644 --- a/guide.md +++ b/guide.md @@ -378,9 +378,9 @@ And there are three rrweb-replayer event will be emitted in the same way: | Event | Description | Value | | ---------------------- | -------------------------------- | ----------------------- | -| ui-update-current-time | current time has changed | { detail: { payload } } | -| ui-update-player-state | current player state has changed | { detail: { payload } } | -| ui-update-progress | current progress has changed | { detail: { payload } } | +| ui-update-current-time | current time has changed | { payload } | +| ui-update-player-state | current player state has changed | { payload } | +| ui-update-progress | current progress has changed | { payload } | ## REPL tool diff --git a/guide.zh_CN.md b/guide.zh_CN.md index 3414fb0d25..9a54488d0f 100644 --- a/guide.zh_CN.md +++ b/guide.zh_CN.md @@ -376,9 +376,9 @@ replayer.on(EVENT_NAME, (payload) => { | 事件类型 | 描述 | 值 | | ---------------------- | -------------- | ----------------------- | -| ui-update-current-time | 当前回放时间点 | { detail: { payload } } | -| ui-update-player-state | 当前回放状态 | { detail: { payload } } | -| ui-update-progress | 当前回放百分比 | { detail: { payload } } | +| ui-update-current-time | 当前回放时间点 | { payload } | +| ui-update-player-state | 当前回放状态 | { payload } | +| ui-update-progress | 当前回放百分比 | { payload } | ## REPL 工具