rrweb
rrweb copied to clipboard
add custom event into the counting of checkout
related to #958, #763
I've marked this PR as a draft because I think there are several things we can discuss.
The benefit of counting all events into the checkout calculating
This let the behavior of checkout become more transparent and can use things like custom event and plugin to do fancy features.
But there is also a sub-question of whether we should count all the meta, load, custom, plugin events, or just part of it. For example, the current PR only count custom event because I think the custom events can be controlled by the recorder user.
The downside of this change
- It will break some current behavior.
- If there is a plugin that can produce a lot of events, it may mass up things.
But we are on the schedule for v2.0, so I think it's good timing if we want to do some changes.
IMO, I'd prefer to include all events because it's more consistent with the meaning checkoutEveryNth. I haven't used this config before so I can't provide suggestions from a user's perspective.
BTW, is it possible for us to implement checkoutEveryNms with setInverval?
I also haven't used this in production so I don't have a proper opinion on the matter, but doing it as part of the 2.0 release makes sense to me