Skip to content

Commit 8c9fee9

Browse files
authored
ensure media elements have their source blocked correctly (#3414)
See highlight/rrweb#97 * Fixes a bug in the `needsMask` processing that would stop recording children if `highlight-mask` was set on a div with `enableStrictPrivacy` set globally. * Adds source obfuscation for other media elements: video, audio, and source. * brings back client visibility listener start/stop since that was not the cause of this bug. Testing: [gamma app with new client recording with strict privacy on](https://app.highlight.io/1/sessions/Zmu6YxT5nVUbkUnnN5U7tNRckUGU) before the fix - https://app.highlight.io/649/sessions/o5jfoC9BXXjBkxqwpVbNNDWK3hcI after the fix - https://app.highlight.io/649/sessions/9DR6a5arNtGacbkr2pwyPn5ENh3E
1 parent d69d5cc commit 8c9fee9

File tree

5 files changed

+41
-3
lines changed

5 files changed

+41
-3
lines changed

client/src/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`,
764764
this._lastVisibilityChangeTime = new Date().getTime()
765765
this.logger.log(`Detected window ${hidden ? 'hidden' : 'visible'}.`)
766766
if (!hidden) {
767+
await this.initialize()
767768
this.addCustomEvent('TabHidden', false)
768769
} else {
769770
this.addCustomEvent('TabHidden', true)
@@ -794,6 +795,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`,
794795
}
795796
}
796797
}
798+
this.stopRecording()
797799
}
798800
}
799801

docs

Submodule docs updated from a35871f to 1cacadc

firstload/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "highlight.run",
3-
"version": "5.1.6",
3+
"version": "5.1.7",
44
"scripts": {
55
"build": "yarn typegen && rollup -c",
66
"dev": "doppler run -- rollup -c -w",

frontend/src/pages/Buttons/Buttons.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,42 @@ export const Buttons = () => {
473473
}
474474
/>
475475
</Box>
476+
477+
<Box mb="24">
478+
<Box display="flex">
479+
{[
480+
'asdf',
481+
'highlight-mask',
482+
'highlight-block',
483+
'highlight-ignored',
484+
].map((c) => (
485+
<Box
486+
key={c}
487+
display="flex"
488+
flexDirection="column"
489+
className={c}
490+
id={`video-test-${c}`}
491+
data-id={`video-test-${c}`}
492+
>
493+
<span>class `{c}`</span>
494+
<video
495+
controls={true}
496+
width="250"
497+
className={`asdf-${c}`}
498+
>
499+
<source
500+
src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm"
501+
type="video/webm"
502+
/>
503+
<source
504+
src="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
505+
type="video/mp4"
506+
/>
507+
</video>
508+
</Box>
509+
))}
510+
</Box>
511+
</Box>
476512
</div>
477513
</div>
478514
)

rrweb

Submodule rrweb updated from 4dff8ed to a4df49b

0 commit comments

Comments
 (0)