Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
314 commits
Select commit Hold shift + click to select a range
ef0a75b
Add support for SVG elements in AssetManager
Juice10 Dec 15, 2023
8ca143a
Drop support for caching xlink:href attributes
Juice10 Dec 15, 2023
c4bfc0f
Remove console.log statement in
Juice10 Dec 15, 2023
62f5b2f
Linux and Mac generate slightly different screenshots
Juice10 Dec 15, 2023
38eeb7c
Remove syntax error
Juice10 Dec 15, 2023
45495c0
Add wait for RAF before evaluating snapshots
Juice10 Dec 15, 2023
85281ca
Changeset: Added support for Asset Event and capturing many
Juice10 Dec 15, 2023
636d04b
Update puppeteer version in package.json
Juice10 Jan 16, 2024
41ac06d
Fix cross-origin iframe message forwarding test
Juice10 Jan 16, 2024
8ab0f62
Deprecate `inlineImages` and introduce `captureAssets` option
Juice10 Feb 5, 2024
8eb1aac
Docs: add examples to `getUrlsFromSrcset`
Juice10 Feb 5, 2024
9a89d54
Revert accidental change to `backToNormal`
Juice10 Feb 5, 2024
0eb51c1
Move @rrweb/types to devDependencies for rrweb-snapshot
Juice10 Feb 6, 2024
03e4938
Remove console.log statements in asset-integration.test.ts
Juice10 Mar 18, 2024
b5b71c2
Update packages/rrweb/src/replay/asset-manager/index.ts
Juice10 Mar 20, 2024
56b784f
Delay call until all attributes are present on the new node, in case …
eoghanmurray Mar 25, 2024
eee5db3
Rename Cacheable -> Capturable
eoghanmurray Mar 25, 2024
bfa64bd
Apply formatting changes
Juice10 May 22, 2024
640f2e7
Apply formatting changes
Juice10 Jun 9, 2024
1948f97
Apply formatting changes
Juice10 Jun 9, 2024
94bbd9a
Trigger CI again
Juice10 Jun 9, 2024
e4b86b3
Apply formatting changes
Juice10 Jun 9, 2024
10898d9
Fix typo in deprecated test
eoghanmurray Jun 18, 2024
072841e
Make test less flaky
Juice10 Dec 4, 2023
bddad81
add @types/prettier dependency
Juice10 Dec 14, 2023
5ad2893
Indicate the presence of deferred assets using new `rr_captured_*` at…
eoghanmurray Mar 25, 2024
7f1a769
Revert attributes in non-live mode and ensure this happens when we ca…
eoghanmurray Mar 27, 2024
9c51e94
Only record certain iframes as assets as we don't want to override th…
eoghanmurray Mar 27, 2024
8632a1b
Fixup: we don't need template strings here
eoghanmurray Mar 28, 2024
ad4ad55
Ensure we correctly distinguish between html <iframes> and other exot…
eoghanmurray Mar 28, 2024
8a0c99e
Bump timeouts here as I was getting failures when running whole test …
eoghanmurray Mar 28, 2024
38047d5
Add an `asset` type which includes the element; a bit of prep work fo…
eoghanmurray Mar 28, 2024
4e3a127
This function was replaced by getSourcesFromSrcset which ultimately d…
eoghanmurray Apr 2, 2024
e3a0b6b
Refactor and prepare for some changes: Deal with the difference betwe…
eoghanmurray Apr 3, 2024
b8d065c
Create assetStatus type as per Justin's request
eoghanmurray Apr 3, 2024
03280fe
Fix types as per suggestions from code review
Juice10 Apr 5, 2024
b439a6d
Update packages/rrweb/src/replay/canvas/2d.ts
Juice10 Apr 5, 2024
06942d0
Don't rename attrs of assets which will be refused according to initi…
eoghanmurray Apr 22, 2024
edbabe3
New config option inlineStylesheet='all' in order to fetch stylesheet…
eoghanmurray Apr 24, 2024
481ba26
Simplify onAssetDetected function signature
eoghanmurray Apr 25, 2024
f26d30b
Don't double capture blobs as _cssText and an asset. Fixes test 'capt…
eoghanmurray Apr 25, 2024
4b0ef77
Prefer to inlineStylesheets using Assets so that we can take advantag…
eoghanmurray Apr 25, 2024
c517df1
No need to search through document.styleSheets as the sheet property …
eoghanmurray Apr 26, 2024
5d30e06
Improvements to comments on buildStyleNode (don't want to rebase as i…
eoghanmurray May 1, 2024
4411f9c
Capture <style> element css via an asset event to avoid main thread p…
eoghanmurray May 2, 2024
7389adb
Add a slight delay as per #1455
eoghanmurray Apr 30, 2024
2e9fc4e
Allow certain assets to be captured synchronously during mutation
eoghanmurray Apr 30, 2024
2861ad1
Add setting to control how quickly stylesheet assets get emitted - so…
eoghanmurray May 1, 2024
f4f094f
Don't queue up asset callbacks twice; was happening after `replayer.p…
eoghanmurray May 1, 2024
f8d624b
We can rebuild styles immediately without the async/promise delay tha…
eoghanmurray May 1, 2024
58d538e
When we rebuild styles immediately from a snapshot, ensure we are cor…
eoghanmurray May 1, 2024
a167d7a
Didn't realize we can use the 'as' keyword to treat an rrdom element …
eoghanmurray May 1, 2024
984f590
Fix up an issue with the assumption that origins applies only to images
eoghanmurray May 1, 2024
7667843
Restore `inlineImages` as a first class config option which bypasses …
eoghanmurray May 9, 2024
aafb7fc
Remove tests that are duplicated minus the 'if inlineImages is on' pa…
eoghanmurray May 1, 2024
3b979f9
Don't emit style mutations if we haven't serialized the style sheet y…
eoghanmurray May 1, 2024
65b8310
Replicate the 'removing style elements' test but with an asset
eoghanmurray May 2, 2024
a280a46
Catch and fix omission of absoluteToStylesheet processing on style te…
eoghanmurray May 2, 2024
dd64ec0
Add a try/catch here as we may not be reading anchor.href
eoghanmurray May 2, 2024
95d5ac1
Explore how we capture assets that have disappeared from the DOM
eoghanmurray May 2, 2024
a954d52
Add some notes after considering changing these to use assets
eoghanmurray May 3, 2024
22be2cc
Add explanation as to why we are patching createObjectURL
eoghanmurray May 3, 2024
e771470
Idea from Justin: Store cssText as an array rather than with the extr…
eoghanmurray May 8, 2024
c0b57cb
Allow usage of requestIdleCallback to be turned off altogether by set…
eoghanmurray May 8, 2024
f3d7477
requestIdleCallback: Process inline <style> elements before <link rel…
eoghanmurray May 8, 2024
a8c9bc0
Simplify by passing the inlineStylesheets config setting around as pa…
eoghanmurray May 9, 2024
2bd662b
These settings are not 'inlining' in the snapshot but rather producin…
eoghanmurray May 9, 2024
e6a6f66
Transfer the legacy default setting into a special 'without-fetch' in…
eoghanmurray May 9, 2024
27b407d
Enable all capturing of stylesheets via assets to be turned off
eoghanmurray May 9, 2024
1aabb71
Add a setting to enable turning off of assets for smaller stylesheets…
eoghanmurray May 13, 2024
052971a
Properly handle a loading CORS stylesheet as a mutation + asset rathe…
eoghanmurray May 13, 2024
ff507bc
Rewrite of assets.md and move out of recipes into core docs
eoghanmurray May 14, 2024
3914dea
Apply formatting changes
eoghanmurray May 14, 2024
48ec96f
Satisfy eslint
eoghanmurray May 15, 2024
f3b33c1
Satisfy typescript by creating an Interface to acknowledge the extra …
eoghanmurray May 16, 2024
191136a
Don't just re-assert 'detected' in the explanatory comment
eoghanmurray May 20, 2024
4199727
Prefer waitForRAF over timeout as the latter operates in puppeteer ra…
eoghanmurray May 22, 2024
1146d75
Update assets.zh_CN.md
YunFeng0817 May 22, 2024
ba9aa2a
Remove doubly added prettier reference
eoghanmurray Jun 18, 2024
519f28b
Fixup expected server url; presumably this is a side effect of switch…
eoghanmurray Jun 18, 2024
60f7e10
Fixup test: maybe vite doesn't incorrectly produce this dupe?
eoghanmurray Jun 18, 2024
903c71e
Continue fixes from #1510
eoghanmurray Jun 18, 2024
1495c08
Extra pause needed after switch from jest to vitest, when running tes…
eoghanmurray Jun 21, 2024
4aff884
Fixups to imports; I'm not sure where this all went wrong in the reba…
eoghanmurray Jul 4, 2024
aa6d711
fixup! Caught a case where a text mutation, which bypasses `_cssText`…
eoghanmurray Jul 10, 2024
0c8bd77
This was removed in single-style-capture but 'reintroduced' in this h…
eoghanmurray Jul 10, 2024
fad3174
Fix that the `false` default on `shouldIgnoreAssets` should have been…
eoghanmurray Jul 10, 2024
16524b3
Fix that we would have tried to capture an asset with a malformed url…
eoghanmurray Jul 10, 2024
fe37114
Honour the 'omits css contents for asset managed stylesheet' test:
eoghanmurray Jul 10, 2024
40d8ada
Improve consistency in terms of where in the test the asset appears
eoghanmurray Jul 10, 2024
014d6da
Apply formatting changes
eoghanmurray Jul 10, 2024
00f4935
Prior to this PR, we weren't previously storing blank _cssText; could…
eoghanmurray Jul 10, 2024
5c86f92
Improve test reliability
eoghanmurray Jul 10, 2024
53eb1f6
Think we need tighter processing for the tests to pass in the CI - pr…
eoghanmurray Jul 10, 2024
1b907b1
These tests were showing variation in CI
eoghanmurray Jul 12, 2024
6539a66
fixup! Move types from rrweb-snapshot to @rrweb/types
eoghanmurray Aug 15, 2024
7e66680
Unknown changes to yarn.lock
eoghanmurray Aug 15, 2024
cc9e928
Apply formatting changes
eoghanmurray Aug 20, 2024
8b50171
Add a queueing mechanism so that in Live Mode we don't render full sn…
eoghanmurray Aug 20, 2024
47d015b
assetCount would not suffice if multiple FullSnapshots were present i…
eoghanmurray Oct 11, 2024
803e93b
Satisfy typings
eoghanmurray Oct 14, 2024
58138e1
Apply formatting changes
eoghanmurray Oct 14, 2024
14172af
Mark where I think the assetManager resets were supposed to happen as…
eoghanmurray Oct 18, 2024
27f604d
More accurate setting of 'allAdded' based on how asset urls compare t…
eoghanmurray Oct 18, 2024
2c248e1
Allow duplicate assets to only be sent once per recording (e.g. in a …
eoghanmurray Oct 23, 2024
21ffbb7
Fixup test: this test doesn't use the stylesheet assets so make sure …
eoghanmurray Oct 25, 2024
f772403
Fixup test, there's no significance in asset ordering
eoghanmurray Oct 25, 2024
6571905
Store the full URL for <style> assets as from a backend point of view…
eoghanmurray Nov 8, 2024
e26ba4a
The `allAdded` flag no longer made sense in the context of multiple f…
eoghanmurray Nov 8, 2024
18d7bd8
Guard against scenarios where preloadAllAssets is not called (came up…
eoghanmurray Nov 13, 2024
db8fe10
Fix for 'should list original url in non-live mode when asset never g…
eoghanmurray Nov 29, 2024
32dd9bb
This was failing again, so have reverted
eoghanmurray Nov 29, 2024
9410ae0
Don't capture small stylesheets as assets as timing issues are causin…
eoghanmurray Nov 29, 2024
c860537
Ensure blocking class is respected to prevent processing of assets
eoghanmurray Dec 2, 2024
8618b2e
Add settings for explicit control of whether to record video and audi…
eoghanmurray Dec 3, 2024
cec495a
Strip out base64 from asset events also so that they don't show up in…
eoghanmurray Feb 17, 2025
c08e0b4
Allow video/audio/images to be explicitly turned off in order to over…
eoghanmurray Feb 20, 2025
c54b542
Fix patch import
eoghanmurray Feb 20, 2025
5865d43
'callback' name was no longer obvious to me
eoghanmurray Feb 20, 2025
70515a7
Add a test to check whether video blobs don't get captured by default
eoghanmurray Feb 20, 2025
7996be1
Fix that we were overriding the defaults with the empty object, and f…
eoghanmurray Feb 20, 2025
ef5ab61
Fix camelCase error
eoghanmurray Feb 20, 2025
4c8361b
Refactor to avoid an eslint error and an extra call to parentNode
eoghanmurray Feb 20, 2025
36fea0e
Fix some linting errors
eoghanmurray Feb 20, 2025
8703dc5
Avoid a typescript 'Unsafe member access' error (even though it was a…
eoghanmurray Feb 24, 2025
b05f197
Try to fix: error TS7053: Element implicitly has an 'any' type becaus…
eoghanmurray Feb 25, 2025
ba1d570
Another attempt to placate eslint; there is no failure on my local co…
eoghanmurray Feb 25, 2025
46c0e80
`.attributes` are no longer populated when an element is blocked afte…
eoghanmurray Feb 25, 2025
5e99b21
Lack of requestIdleCallback on iOS was causing unexpected event emiss…
eoghanmurray Feb 27, 2025
e516b0c
Don't capture stylesheet Assets if they have a media attribute which …
eoghanmurray Mar 28, 2025
88aabf9
As per #1657
eoghanmurray Aug 21, 2025
9735792
Fix bug where delayed <style> elements were not getting built
eoghanmurray Aug 21, 2025
861364a
Set AssetEvent timestamps such that they match the FullSnapshot or In…
eoghanmurray Apr 9, 2025
d9ea548
Add initial sketch of websocket client
eoghanmurray Nov 7, 2025
6b8c050
Fixup for sketch; wasn't compiling
eoghanmurray Nov 12, 2025
2eb519b
Upload metadata as a separate custom event, simply to avoid having to…
eoghanmurray Nov 12, 2025
82d2290
Frontend JavaScript script tag support, inline json within a regular …
eoghanmurray Nov 13, 2025
f0ff094
Add some analytics related capturing to the meta event and a way to t…
eoghanmurray Nov 13, 2025
f34727e
Fixup
eoghanmurray Nov 14, 2025
df32215
Found another case where I accidentally created bad JSON by using sin…
eoghanmurray Nov 14, 2025
4726a9f
After discussion with Justin; a 'recording' is associated with the br…
eoghanmurray Nov 15, 2025
bdcd655
Distinguish between metadata we attach to a recording (searchable) an…
eoghanmurray Nov 15, 2025
05ec772
When we encounter an error, stop trying to upload, but transfer new e…
eoghanmurray Nov 15, 2025
dca122c
Default to omitting PII, including not setting a cookie
eoghanmurray Nov 15, 2025
d36fe5f
Prefer `includes` formulation for brevity and as it composes better (…
eoghanmurray Nov 16, 2025
cfcf184
Noticed two different interpretations of `headMetaAuthorship` under s…
eoghanmurray Nov 16, 2025
5665085
Fix `Property 'innerText' does not exist on type 'HTMLOrSVGScriptElem…
eoghanmurray Nov 16, 2025
020d8b2
Halt everything if we don't have a recordingId, as it's the basis for…
eoghanmurray Nov 16, 2025
abc5184
Fixup some typing issues on payloads, clarify that simpler name value…
eoghanmurray Nov 16, 2025
2bf0b87
This typescript messing is needed to show that we know that getAttrib…
eoghanmurray Nov 16, 2025
19f2d94
Common defaultClientConfig no matter how they `start()` is called
eoghanmurray Nov 16, 2025
bb0452f
Also pause when we get a NOK upstream result (we weren't looking at e…
eoghanmurray Nov 16, 2025
6f0ca6d
We will work out session delineation based on server side gaps etc
eoghanmurray Nov 16, 2025
be59b4e
Add language to go with timezone for includePii option
eoghanmurray Nov 16, 2025
e948120
A note as I haven't documented this one as being part of the PII (Pre…
eoghanmurray Nov 16, 2025
05c07ed
Enable the main APIs to be used when file is served from e.g. https:/…
eoghanmurray Nov 16, 2025
22f534d
Keep the calculated config around so that it's available for a subseq…
eoghanmurray Nov 16, 2025
e8556ad
fixup! Enable the main APIs to be used when file is served from e.g. …
eoghanmurray Nov 16, 2025
02537ed
Some considerations around page lifecycle and reasoning how restart w…
eoghanmurray Nov 16, 2025
521d9d3
Prettify
eoghanmurray Nov 16, 2025
311a429
Move the initial payload (and `serverUrl` calculation) out of the fu…
eoghanmurray Nov 16, 2025
376c7ba
Was only correct to set `ws = undefined` in the outside scope - const…
eoghanmurray Nov 18, 2025
52b3a0f
Fallback to POSTing data using our api if the connection fails to be …
eoghanmurray Nov 18, 2025
c309681
Break into multiple POSTs to try to get as much data in the event we'…
eoghanmurray Nov 18, 2025
0a7e806
Add a todo
eoghanmurray Nov 18, 2025
6f32940
Whoops, wasn't compiling
eoghanmurray Nov 18, 2025
d608ac0
This was for POC
eoghanmurray Nov 19, 2025
87fe54a
fixup! Fallback to POSTing data using our api if the connection fails…
eoghanmurray Nov 19, 2025
1deb141
fixup! Break into multiple POSTs to try to get as much data in the ev…
eoghanmurray Nov 19, 2025
132cc9f
fixup! Some considerations around page lifecycle and reasoning how re…
eoghanmurray Nov 19, 2025
83185f4
Add application metadata to the initial `recording-meta` custom event…
eoghanmurray Nov 19, 2025
a095cb3
fixup! Move the initial payload (and `serverUrl` calculation) out of …
eoghanmurray Nov 19, 2025
20b0c04
Demonstrate including metadata in the intial `recording-meta` custom …
eoghanmurray Nov 19, 2025
3ac237e
refactor: rename ws-client package to `@rrwebcloud/js-client`
Juice10 Nov 19, 2025
10b3edf
chore: add changeset for `@rrwebcloud/js-client` patch release
Juice10 Nov 19, 2025
a4f20ed
Merge pull request #2 from rrweb-cloud/juice10/ws-package-rename-2
Juice10 Nov 19, 2025
eb9a257
chore: update dependencies
Juice10 Nov 19, 2025
e79fd1f
release: ignore all none-@rrwebcloud packages
Juice10 Nov 19, 2025
618fce8
Set to correct config.json
Juice10 Nov 19, 2025
5b01340
feat: Add `@rrweb/record` dependency to `ws-client`, introduce a scri…
Juice10 Nov 19, 2025
0816f09
chore: fix linting issues
Juice10 Nov 19, 2025
2513286
fix linting issues
Juice10 Nov 19, 2025
09ef57b
Fix test failure
Juice10 Nov 19, 2025
6df84d8
tests: font rendering is different per OS, account for that
Juice10 Nov 19, 2025
5893610
Fix tests
Juice10 Nov 19, 2025
217a8d0
feat: only release @rrwebcloud packages.
Juice10 Nov 19, 2025
4c270a7
Merge pull request #3 from rrweb-cloud/juice10/linting
Juice10 Nov 19, 2025
5e9d724
ci: Add write and pull-request permissions for release workflow.
Juice10 Nov 19, 2025
f4dd1a7
Version Packages (alpha)
github-actions[bot] Nov 19, 2025
0b72f9a
Merge pull request #4 from rrweb-cloud/changeset-release/master
Juice10 Nov 19, 2025
a15139b
Revert "Merge pull request #4 from rrweb-cloud/changeset-release/master"
Juice10 Nov 19, 2025
026fb1c
chore: Set `private: true` for all packages without @rrwebcloud prefi…
Juice10 Nov 19, 2025
50d31a6
Version Packages (alpha)
github-actions[bot] Nov 19, 2025
dba2c9b
Merge pull request #5 from rrweb-cloud/changeset-release/master
Juice10 Nov 19, 2025
5cc9403
ci: temporarily disable Chrome extension publishing
Juice10 Nov 19, 2025
6962e29
chore: Rename package output file paths from `ws-client` to `js-clien…
Juice10 Nov 20, 2025
266fbf4
changeset: Use correct path for bundled file names
Juice10 Nov 20, 2025
0317a0f
feat: Export types and functions for named imports and update default…
Juice10 Nov 20, 2025
aec5329
Update .changeset/export-ws-client-functions.md
Juice10 Nov 20, 2025
9cc0ed5
Merge pull request #6 from rrweb-cloud/juice10/ws-client-bundle-file-…
Juice10 Nov 20, 2025
914a1c3
Version Packages (alpha)
github-actions[bot] Nov 20, 2025
aefc7fd
Merge pull request #7 from rrweb-cloud/changeset-release/master
Juice10 Nov 20, 2025
200cb70
feat: Implement public API key support for authenticating WebSocket c…
Juice10 Nov 20, 2025
20f7a0b
Add changeset
Juice10 Nov 20, 2025
4142069
refactor: consolidate publicAPIkey destructuring in start function.
Juice10 Nov 21, 2025
1767cce
Merge pull request #8 from rrweb-cloud/juice10/public-api-key-js-client
Juice10 Nov 21, 2025
8f8871c
Version Packages (alpha)
github-actions[bot] Nov 21, 2025
f8da08d
Merge pull request #9 from rrweb-cloud/changeset-release/master
Juice10 Nov 21, 2025
a96b6db
refactor: rename `publicAPIkey` to `publicApiKey` in `ws-client`
Juice10 Nov 21, 2025
79bd4a5
refactor: rename `publicAPIkey` to `publicApiKey` in `ws-client`
Juice10 Nov 21, 2025
3669248
Merge pull request #10 from rrweb-cloud/juice10/public-api-key-js-client
Juice10 Nov 21, 2025
8dc7c4e
Version Packages (alpha)
github-actions[bot] Nov 21, 2025
20f1f10
Merge pull request #11 from rrweb-cloud/changeset-release/master
Juice10 Nov 21, 2025
c793019
feat: Add temporary recording metadata POST endpoint
Juice10 Nov 21, 2025
79ee62f
Merge pull request #12 from rrweb-cloud/juice10/post-meta-data
Juice10 Nov 21, 2025
48f12f3
Version Packages (alpha)
github-actions[bot] Nov 21, 2025
d16712e
Merge pull request #13 from rrweb-cloud/changeset-release/master
Juice10 Nov 21, 2025
2921f81
Add the recordingId as a GET param to urls if `{recordingId}` isn't p…
eoghanmurray Nov 22, 2025
f102ebe
It would be very unexpected to have a different subdomain used when s…
eoghanmurray Nov 22, 2025
2e4d7e0
The name of the client js file has been updated
eoghanmurray Nov 22, 2025
704996c
The metadata handling in the websockets event stream is in place now,…
eoghanmurray Nov 22, 2025
5ec14fc
Fixup parent comment
eoghanmurray Nov 23, 2025
7c259f0
Support providing the emit function as a string; can use the name of …
eoghanmurray Nov 23, 2025
8226cdc
Get first test for ws-client up and running
eoghanmurray Nov 23, 2025
b0e816b
Successfully test endpoint over websockets to db and back
eoghanmurray Nov 24, 2025
ea70c64
Add checking that meta config gets recorded
eoghanmurray Nov 24, 2025
04d7e71
Apply formatting changes
eoghanmurray Nov 24, 2025
48b8ed7
Clear the POST setInterval timer if we get one bad response; I'm anti…
eoghanmurray Nov 25, 2025
15ec236
Apply formatting changes
eoghanmurray Nov 25, 2025
de14f57
Add an example of where to add api keys
eoghanmurray Nov 25, 2025
514b31c
Fixup meta url
eoghanmurray Nov 26, 2025
542fedb
Fix that #12 specified application/json instead of ndjson
eoghanmurray Nov 27, 2025
a4ee0d3
Fix that I messed up and sent the whole rrweb event to the meta endpo…
eoghanmurray Nov 27, 2025
080a6b9
Embarrassing fixup: If websockets were down, we were adding a new met…
eoghanmurray Nov 27, 2025
dde2418
Reverse logic here as I took the 'close' as being caused by the serve…
eoghanmurray Nov 27, 2025
266c9fd
Restore an earlier comment of mine, presume this was AI editing
eoghanmurray Nov 27, 2025
a03e249
Repeat the roundtrip test against a failing websocket serverUrl, so w…
eoghanmurray Nov 27, 2025
a04b0d1
Cleanup unused imports
eoghanmurray Nov 27, 2025
12ac836
Re-add failed POST data to buffer for future retry
eoghanmurray Nov 27, 2025
45494fb
vitest update is needed for `.concurrent.for`
eoghanmurray Nov 27, 2025
b3632b1
Justin: won't follow redirects (Eoghan: not sure if we'll get redirec…
eoghanmurray Nov 27, 2025
8f96681
Put the key in the URL for my manual testing
eoghanmurray Nov 27, 2025
aa6855a
Don't need to hit the separate /meta endpoint when the regular POST i…
eoghanmurray Nov 27, 2025
2c2f56d
Add a `stop` function and reorganize the global variables to gather t…
eoghanmurray Nov 27, 2025
a66e961
Add patch to create a release
eoghanmurray Nov 28, 2025
4c617e6
Apply formatting changes
eoghanmurray Nov 28, 2025
5e43664
Version Packages (alpha)
github-actions[bot] Nov 28, 2025
f9caccf
Merge pull request #14 from rrweb-cloud/changeset-release/master
eoghanmurray Nov 28, 2025
fd591aa
Allow relative urls in the case where a single build needs to be depl…
eoghanmurray Nov 28, 2025
9ee4729
Lint and don't be so defensive about try/catch - we'll add some instr…
eoghanmurray Nov 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "rrweb-io/rrweb" }],
"changelog": [
"@changesets/changelog-github",
{
"repo": "rrweb-cloud/rrweb"
}
],
"commit": false,
"fixed": [
[
Expand Down Expand Up @@ -28,6 +33,5 @@
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
"updateInternalDependencies": "patch"
}
9 changes: 9 additions & 0 deletions .changeset/export-ws-client-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@rrwebcloud/js-client": minor
---

Export functions and types to allow named imports. The package now supports both default and named imports:

- `import { start, addMeta, addPageviewMeta, addCustomEvent, getRecordingId } from '@rrwebcloud/js-client'`
- `import { clientConfig, nameValues } from '@rrwebcloud/js-client'` (types)
- `import client from '@rrwebcloud/js-client'` (then use `client.start()`, `client.addMeta()`, etc.)
5 changes: 5 additions & 0 deletions .changeset/fair-llamas-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rrwebcloud/js-client": major
---

refactor: rename `publicAPIkey` to `publicApiKey` in `.start()`
5 changes: 5 additions & 0 deletions .changeset/fair-vans-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rrwebcloud/js-client": minor
---

Allow recording of meta data
5 changes: 5 additions & 0 deletions .changeset/flat-fireants-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rrwebcloud/js-client": patch
---

Release @rrwebcloud/js-client
5 changes: 5 additions & 0 deletions .changeset/harder-faster-stronger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rrwebcloud/js-client": patch
---

🔧 improve how fallback from websockets to POST works. Add a public stop function
5 changes: 5 additions & 0 deletions .changeset/moody-maps-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rrwebcloud/js-client": patch
---

Use correct path for bundled file names
35 changes: 34 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@
"@rrweb/rrweb-plugin-sequential-id-replay": "2.0.0-alpha.14",
"@rrweb/record": "2.0.0-alpha.14",
"@rrweb/replay": "2.0.0-alpha.14",
"@rrweb/utils": "2.0.0-alpha.16"
"@rrweb/utils": "2.0.0-alpha.16",
"@rrwebcloud/js-client": "2.0.0-alpha.18"
},
"changesets": [
"angry-turtles-provide",
"attribute-text-reductions",
"beige-olives-roll",
"blank-cherries-laugh",
"blank-dev-changset",
"brave-numbers-joke",
"breezy-cats-heal",
"breezy-mice-breathe",
Expand All @@ -45,37 +49,51 @@
"curvy-apples-lay",
"curvy-balloons-brake",
"date-now-guard",
"dirty-pets-fly",
"dirty-rules-dress",
"efficiently-splitCssText-1603",
"efficiently-splitCssText-1640",
"eight-terms-hunt",
"eighty-teachers-smash",
"eleven-bobcats-peel",
"eleven-toys-vanish",
"empty-bikes-cheer",
"eslint-camelcase-devonly",
"event-single-wrap",
"export-ws-client-functions",
"fair-dragons-greet",
"fair-ducks-clean",
"fair-llamas-rush",
"fair-vans-hammer",
"famous-bobcats-push",
"fast-chefs-smell",
"fast-pets-exist",
"few-rockets-travel",
"few-turkeys-reflect",
"five-peas-lay",
"fix-adapt-css",
"flat-fireants-whisper",
"fluffy-planes-retire",
"format-head-prettier",
"forty-elephants-attack",
"four-panthers-fly",
"fresh-cars-impress",
"fresh-spoons-drive",
"friendly-numbers-leave",
"fuzzy-mugs-march",
"giant-rats-chew",
"gold-apples-joke",
"gold-experts-type",
"gold-terms-look",
"great-cows-camp",
"grumpy-ways-own",
"happy-carrots-hide",
"harder-faster-stronger",
"hip-worms-relax",
"hungry-dodos-taste",
"inlineImage-maybeNot-crossOrigin",
"itchy-dryers-double",
"itchy-tables-compete",
"khaki-dots-bathe",
"kind-kids-design",
"large-ants-prove",
Expand All @@ -90,6 +108,8 @@
"lovely-files-sparkle",
"lovely-pears-cross",
"lovely-students-boil",
"lucky-donuts-hammer",
"lucky-trainers-joke",
"mean-tips-impress",
"metal-mugs-mate",
"mighty-ads-worry",
Expand All @@ -98,7 +118,9 @@
"modern-doors-watch",
"moody-dots-refuse",
"moody-experts-build",
"moody-maps-cheat",
"nasty-scissors-reply",
"nervous-actors-jam",
"nervous-buses-pump",
"nervous-kiwis-nail",
"nervous-mirrors-perform",
Expand All @@ -107,10 +129,12 @@
"new-snakes-call",
"nice-pugs-reply",
"no-neg-lookbehind",
"odd-onions-brush",
"old-dryers-hide",
"perfect-bulldogs-punch",
"perfect-dolls-grab",
"polite-olives-wave",
"pretty-candles-chew",
"pretty-meals-flash",
"pretty-plums-rescue",
"pretty-schools-remember",
Expand All @@ -120,13 +144,18 @@
"rare-adults-sneeze",
"real-masks-explode",
"real-trains-switch",
"red-peaches-explode",
"rich-crews-protect",
"rich-dots-lay",
"rich-jars-remember",
"rich-scissors-hide",
"rotten-spies-enjoy",
"serious-ants-juggle",
"serious-eggs-greet",
"shadow-dom-unbusify",
"sharp-flies-help",
"short-hounds-confess",
"shy-countries-rhyme",
"silent-plants-perform",
"silly-knives-chew",
"silver-pots-sit",
Expand All @@ -136,6 +165,7 @@
"six-llamas-brush",
"sixty-impalas-laugh",
"skip-mask-check-on-leaf-elements",
"slimdom-defaults-refactor",
"slimy-eagles-grow",
"small-hats-kneel",
"small-olives-arrive",
Expand All @@ -145,10 +175,12 @@
"smooth-poems-bake",
"soft-worms-tan",
"spotty-bees-destroy",
"spotty-emus-listen",
"stupid-ghosts-help",
"swift-dancers-rest",
"swift-peas-film",
"swift-pots-search",
"textarea-inner-html",
"thin-vans-applaud",
"thirty-baboons-punch",
"three-baboons-bow",
Expand All @@ -171,6 +203,7 @@
"wise-spiders-jog",
"witty-kids-talk",
"yellow-mails-cheat",
"yellow-vans-protect",
"young-timers-grow"
]
}
8 changes: 8 additions & 0 deletions .changeset/pretty-candles-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"rrweb-snapshot": minor
"rrweb": minor
"rrdom": patch
"@rrweb/types": patch
---

Added support for Asset Event and capturing many different types of assets (not just img#src)
5 changes: 5 additions & 0 deletions .changeset/sharp-flies-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rrwebcloud/js-client": minor
---

Implement public API key support for authenticating WebSocket connections and POST data requests.
2 changes: 2 additions & 0 deletions .changeset/slimdom-defaults-refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
8 changes: 8 additions & 0 deletions .changeset/yellow-vans-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"rrweb-snapshot": major
"@rrweb/types": patch
---

`NodeType` enum was moved from rrweb-snapshot to @rrweb/types
The following types where moved from rrweb-snapshot to @rrweb/types: `documentNode`, `documentTypeNode`, `attributes`, `legacyAttributes`, `elementNode`, `textNode`, `cdataNode`, `commentNode`, `serializedNode`, `serializedNodeWithId` and `DataURLOptions`
`inlineImage` config option is deprecated and in `rrweb` is an alias for `captureAssets` config option
23 changes: 13 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -39,13 +42,13 @@ jobs:
if: steps.changesets.outputs.published == 'true'
run: NODE_OPTIONS='--max-old-space-size=4096' DISABLE_WORKER_INLINING=true yarn turbo run prepublish --filter=@rrweb/web-extension

- name: Publish Chrome Extension
uses: mnao305/chrome-extension-upload@v5.0.0
if: steps.changesets.outputs.published == 'true'
with:
extension-id: 'pdaldeopoccdhlkabbkcjmecmmoninhe'
file-path: ./packages/web-extension/dist/chrome.zip
client-id: ${{ secrets.CWS_CLIENT_ID }}
client-secret: ${{ secrets.CWS_CLIENT_SECRET }}
refresh-token: ${{ secrets.CWS_REFRESH_TOKEN }}
publish: true
# - name: Publish Chrome Extension
# uses: mnao305/chrome-extension-upload@v5.0.0
# if: steps.changesets.outputs.published == 'true'
# with:
# extension-id: 'pdaldeopoccdhlkabbkcjmecmmoninhe'
# file-path: ./packages/web-extension/dist/chrome.zip
# client-id: ${{ secrets.CWS_CLIENT_ID }}
# client-secret: ${{ secrets.CWS_CLIENT_SECRET }}
# refresh-token: ${{ secrets.CWS_REFRESH_TOKEN }}
# publish: true
4 changes: 2 additions & 2 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ jobs:
contents: write
name: Format Code
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
Expand Down
70 changes: 70 additions & 0 deletions docs/assets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Asset Capture Methods & Configuration in rrweb

[rrweb](https://rrweb.io/) is a JavaScript library that allows you to record and replay user interactions on your website. It provides various configuration options for capturing assets (such as images) during the recording process. In this document, we will explore the different asset capture methods and their configuration options in rrweb.

## Asset Events

Assets are a new type of event that embody a serialized version of a http resource captured during snapshotting. Some examples are images, media files and stylesheets. Resources can be fetched externally (from cache) in the case of a href, or internally for blob: urls and same-origin stylesheets. Asset events are emitted subsequent to either a FullSnapshot or an IncrementalSnapshot (mutation), and although they may have a later timestamp, during replay they are rebuilt as part of the snapshot that they are associated with. In the case where e.g. a stylesheet is referenced at the time of a FullSnapshot, but hasn't been downloaded yet, there can be a subsequent mutation event with a later timestamp which, along with the asset event, can recreate the experience of a network-delayed load of the stylesheet.

## Assets to mitigate stylesheet processing cost

In the case of stylesheets, rrweb does some record-time processing in order to serialize the css rules which had a negative effect on the initial page loading times and how quickly the FullSnapshot was taken (see https://pagespeed.web.dev/). These are now taken out of the main thread and processed asynchronously to be emitted (up to `processStylesheetsWithin` ms) later. There is no corresponding delay on the replay side so long as the stylesheet has been successfully emitted.

## Asset Capture Configuration

The `captureAssets` configuration option allows you to customize the asset capture process. It is an object with the following properties:

- `objectURLs` (default: `true`): This property specifies whether to capture same-origin `blob:` assets using object URLs. Object URLs are created using the `URL.createObjectURL()` method. Setting `objectURLs` to `true` enables the capture of object URLs.

- `origins` (default: `false`): This property determines which origins to capture assets from. It can have the following values:

- `false` or `[]`: Disables capturing any assets apart from object URLs, stylesheets (unless set to false) and images (if that setting is turned on).
- `true`: Captures assets from all origins.
- `[origin1, origin2, ...]`: Captures assets only from the specified origins. For example, `origins: ['https://s3.example.com/']` captures all assets from the origin `https://s3.example.com/`.

- `images` (default: `true` if `inlineImages` is true in rrweb.record config): When set to true, this option turns on asset capturing for all images irrespective of their origin. When set to false, no images will be captured even if the origin matches. By default images will be captured if their src url matches the `origins` setting above, including if the `origins` is set to `true`.

- `video` When set to true, this option turns on asset capturing for videos irrespective of their origin. When set to false, no videos will be captured even if the origin matches. By default videos will be captured if their src url matches the `origins` setting above, including if the `origins` is set to `true`.

- `audio` When set to true, this option turns on asset capturing for audio files irrespective of their origin. When set to false, no audio files will be captured even if the origin matches. By default audio files will be captured if their src url matches the `origins` setting above, including if the `origins` is set to `true`.

- `stylesheets` (default: `'without-fetch'`): When set to `true`, this turns on capturing of all stylesheets and style elements via the asset system irrespective of origin. The default of `'without-fetch'` is designed to match with the previous `inlineStylesheet` behaviour, whereas the `true` value allows capturing of stylesheets which are otherwise inaccessible due to CORS restrictions to be captured via a fetch call, which will normally use the browser cache. If a stylesheet matches via the `origins` config above, it will be captured irrespective of this config setting (either directly or via fetch).

- `stylesheetsRuleThreshold` (default: `0`): only invoke the asset system for stylesheets with more than this number of rules. Defaults to zero (rather than say 100) as it only looks at the 'outer' rules (e.g. could have a single media rule which nests 1000s of sub rules). This default may be increased based on feedback.

- `processStylesheetsWithin` (default: `2000`): This property defines the maximum time in milliseconds that the browser should delay before processing stylesheets. Inline `<style>` elements will be processed within half this value. Lower this value if you wish to improve the odds that short 'bounce' visits will emit the asset before visitor unloads page. Set to zero or a negative number to process stylesheets synchronously, which can cause poor scores on e.g. https://pagespeed.web.dev/ ("Third-party code blocked the main thread"), and also cause assets to be emitted with an earlier timestamp than the snapshot they are associated with.

## TypeScript Type Definition

Here is the TypeScript type definition for the `recordOptions` object, which includes the asset capture configuration options:

```typescript
export type recordOptions<T> = {
// Other configuration options...
captureAssets?: {
objectURLs: boolean;
origins: string[] | true | false;
images: boolean;
stylesheets: boolean | 'without-fetch';
processStylesheetsWithin: number;
stylesheetsRuleThreshold: number;
};
inlineImages?: boolean;
inlineStylesheet?: boolean;
// Other configuration options...
};
```

This type definition shows that `captureAssets` is an optional property of the `recordOptions` object. It contains the `objectURLs` and `origins` properties, which have the same meanings as described above.

## Inline Images

When set in rrweb.record, the previous `inlineImages` configuration option has been changed so that images are now captured using the asset system instead of being inlined into the snapshot. The previous implementation had a problem in that the snapshot was modified asynchronously after images were loaded/processed. hadn't loaded yet, and the snapshot may have already been emitted. When using rrwebSnapshot.snapshot directly, the previous inlining behaviour is still preserved.

## Inline Stylesheets

In rrweb.record the `inlineStylesheet` configuration option has been updated to use the asset system. When it is `true` (the default), stylesheets whose rules are accessible from a CORS point of view are captured as an asset instead of being inlined. There is also now an `inlineStylesheet: 'all'` option which is equivalent to `captureAssets.stylesheets: true`. When using rrwebSnapshot.snapshot directly, the previous inlining behaviour is still preserved.

## Conclusion

By configuring the `captureAssets` option in rrweb, you can control how assets like images are captured during the recording process. This allows you to customize which assets are included in the recorded interactions on your website.
40 changes: 40 additions & 0 deletions docs/assets.zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# rrweb 中的录制静态资源的方法和配置

[rrweb](https://rrweb.io/) 是一个 JavaScript 库,允许您录制并回放您网页上的用户操作。它为录制静态资源(如图像)提供了各种配置选项。在本文档中,我们将探讨 rrweb 中不同的录制静态资源的方法及其配置选项。

## 内联图像(已弃用)

`inlineImages` 配置选项已被弃用,不应再使用。它存在一些问题,即重写已经发出的事件,这可能使您错过已发送到服务器的内联图像。相反,请使用 `captureAssets` 选项来配置静态资源录制。

## 录制静态资源配置

`captureAssets` 配置选项允许您自定义录制静态资源的过程。它是一个具有以下属性的对象:

- `objectURLs`(默认值:`true`):此属性指定是否使用 object URL 录制同源 `blob:` 资源。Object URL 是使用 `URL.createObjectURL()` 方法创建的。将 `objectURLs` 设置为 `true` 可以启用对象 URL 的录制。

- `origins`(默认值:`false`):此属性确定录制哪些域名的资源。它可以有以下值:
- `false` 或 `[]`:除了 Object URL 之外,不录制任何静态资源。
- `true`:从所有来源获取资源。
- `[origin1, origin2, ...]`:仅从指定的来源获取资源。例如,`origins: ['https://s3.example.com/']` 表示录制来自 `https://s3.example.com/` 的所有静态资源。

## TypeScript 类型定义

这是 `recordOptions` 对象的 TypeScript 类型定义,其中包括录制静态资源的配置选项:

```typescript
export type recordOptions<T> = {
// 其他配置选项...
captureAssets?: {
objectURLs: boolean;
origins: string[] | true | false;
};
inlineImages?: boolean; // 已弃用
// 其他配置选项...
};
```

这种类型定义表明 captureAssets 是 recordOptions 对象的一个可选属性。它包含 objectURLs 和 origins 属性,其含义与上述相同。

## 结论

通过在 rrweb 中配置 captureAssets 选项,您可以控制在记录过程中如何录制比如图像这样的静态资源。这允许你自定义在网页上录制的交互中包含哪些静态资源。
Loading
Loading