Comments (5)
@ChuckJonas Added this in #36, please let me know if you like it or not:)
from rrweb.
Looking at my truncated attempts I think the problem is that my event are all EventType. IncrementalSnapshot
.
So maybe this would be possible if I somehow was able to incrementally restart with EventType. FullSnapshot
?
Seems like I could achieve something similar by just having 2-3 offset & restarting rrweb.record
instances running at once, but since there is no way to stop recording (#16), I'm sure this is not a good idea.
from rrweb.
I think the stop recording
ability can let you have a workaround solution. But it will be better if we add a take a full snapshot after N incremental snapshot
option, is that what you need?
For example, take a full snapshot after 5 incremental snapshots will give you a snapshot chain like this:
FS1 -> IS1 -> ... -> IS5 -> FS2 -> IS6 -> ... -> IS10 -> FS3 -> ...
So you can replay from the latest full snapshot and drop the previous snapshots if you do not need them.
from rrweb.
@Yuyz0112
The latter solution you proposed could work for my use case. My only concern is that it might be tricky to balance performance due to variable activity (if the user was generating lots of events vs none at all).
I think a more robust solution would be to expose someway to trigger a full snapshot event emit yourself.
IMO, the most intuitive way of doing this would require changing the return of the record
to an object (instead of just a stop
function):
let recorder = rrweb.record({
emit(event) {
//save event
},
});
//call recorder 'captureFullSnapshot' method every 10 sec
let fullCapture = setInterval(1000 * 10, recorder.captureFullSnapshot);
//stop after 1min
setTimeout(1000 * 60, () => {
recorder.stop();
clearInterval(fullCapture);
});
from rrweb.
@ChuckJonas how about provides two modes?
take one full snapshot after N incremental snapshot
and take one full snapshot after N ms
?
Expose something like captureFullsnapshot
may look too low-level for most of the developers.
from rrweb.
Related Issues (20)
- [Bug]: Types are not exported HOT 1
- [Feature Request]: Setting name as data.payload.name instead of data.tag
- [Bug]: page with multiple canvases freezes in Chrome when sampling is set
- [Bug]: Running yarn install in web-extension fails HOT 3
- [Bug]: On player timeline seek the dom is not correctly build
- [Bug]: Flash of unstyled content when using Web Components
- [Bug]: Node Parent casting of undefined HOT 2
- [Bug]: Cannot read properties of null (reading 'tagName') HOT 2
- [Bug]: Cannot use 'in' operator to search for 'xmlns' in undefined HOT 6
- [Bug]: Performance issue with Mutation observer and rr-block HOT 2
- [Bug]: Duplicate Element Displayed and Warning Message 'Node with ID X Not Found' During Playback After Seeking Multiple Times. HOT 3
- [Bug]: echart color error
- [Bug]: A webpage's icons are displaying in the foreground with increased size in the replayer on a particular website
- [Bug]: Unable to capture the website onhover screens using rrweb.
- [Bug]: Uncaught SyntaxError: Regular expression too large HOT 7
- [Bug]: Injected styles are cleared when node is added to a `<style>` element HOT 1
- [Bug]: Duplicate player window
- [Bug]: Seeking within player doesn't correctly handle scrolling HOT 2
- [Bug]: 前端每十秒save的event发送到controller, data要怎样正确拼接才可以正确回放, 现在我只能播放前十秒, 之后因为拼接出错, 一直播放失败
- [Bug]: The player shows canvas in the wrong way HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rrweb.