Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion packages/rrweb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@highlight-run/rrweb",
"version": "2.0.17",
"version": "2.0.18",
"description": "record and replay the web",
"scripts": {
"prepare": "npm run prepack",
Expand Down
5 changes: 5 additions & 0 deletions packages/rrweb/src/record/observers/canvas/canvas-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ export class CanvasManager {
context?.clear(context.COLOR_BUFFER_BIT);
}
}
// canvas is not yet ready... this retry on the next sampling iteration.
// we don't want to crash the worker if the canvas is not yet rendered.
if (canvas.width === 0 || canvas.height === 0) {
return;
}
const bitmap = await createImageBitmap(canvas);
worker.postMessage(
{
Expand Down
1 change: 0 additions & 1 deletion packages/rrweb/src/replay/styles/inject-style.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const rules: (blockClass: string) => string[] = (blockClass: string) => [
`.${blockClass} { background: currentColor }`,
'noscript { display: none !important; }',
`.${blockClass} { background: currentColor; border-radius: 5px; }`,
`.${blockClass}:hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}`,
Expand Down
12 changes: 12 additions & 0 deletions packages/rrweb/src/replay/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,15 @@
height: 10px;
}
}

.rr-player {
position: relative;
background: white;
float: left;
border-radius: 5px;
box-shadow: 0 24px 48px rgba(17, 16, 62, 0.12);
}

.rr-player__frame {
overflow: hidden;
}