Comments (5)
Just read the description and the commits about media support, it looks nice. I Still need some time to think about this carefully, but the following points may be considered as a design principle:
- It will be nice if the data structure is similar to the node's original data interface, so the serializer will be more transparent to the developer.
- It is important to have a data structure with less overhead, I know there is a trade-off about namespace or abstraction, but still need to be careful here.
Currently, the special cases you've mentioned are following these rules, like only add a flag when it really needs, or re-use the attributes object to store some internal attributes. However, there are absolutely some spaces to improve, but if there is a breaking change, we need to do that ASAP before someone use rrweb in production heavily:)
from rrweb.
How about using a properties
key to store these states?
from rrweb.
A properties
key would be similar to the mediaState
object I used, reusable for properties from all types of DOM objects. I think keeping it typed would be nice to have.
However, I'm not entirely sure that provides the extensibility I meant. A bit like the width
and height
: While storing them as strings in custom-named attributes works, it feels like a bit of a hack. So, I meant, if we're going to add new arbitrary, typed, possible composit values in the future, what is the preferred way to store them? A properties
key only addresses DOM object properties.
I think "we add new keys" is a acceptable answer to that question. But I want to make sure that we agree that is the way to do it, since in the README you mentioned wanting to have a stable data structure for v1.0, and it also implies we'll from now on have to deal with new/missing keys for compatibility between different versions and cannot make any of these keys required in the typedef.
from rrweb.
@DvdGiessen Yes I agree with this and now you can add new keys without considering about compatibility.
cannot make any of these keys required in the typedef
This will be true after v1.0 is released.
from rrweb.
Alright, I'll update and my media branch to include this.
from rrweb.
Related Issues (20)
- [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
- [Bug]: use blockSelector to mask img record will throw error: e.matches is not a function HOT 3
- publish well-formulated and concise types HOT 1
- [Bug]: maskInputFn is not called on inputs
- [feature request]: Record/replay css animation's `currentTime` HOT 6
- [Bug]: progress bar not updating when adding event asynchronously using addEvent
- [Bug]: Added nodes not showing up HOT 1
- Changes the you made may not be saved HOT 1
- [Bug]: CSS `all: unset` incorrectly expands in `events.json` recording HOT 1
- [Bug]: Repeat menu
- [Bug]: Stopping recording causes all insertRule hooks added after record start to drop
- [Bug]: how i can record iframe content HOT 4
- Sanitization/Renaming for Security in Snapshot vs Replay reconstruction HOT 1
- [Bug]: Failed to rebuildFullSnapshot HOT 3
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.