-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f9e089
commit 6b0ed0c
Showing
10 changed files
with
838 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { assignableWindow } from '../utils/globals' | ||
import { getRecordConsolePlugin } from '@rrweb/rrweb-plugin-console-record' | ||
import { record as rrwebRecord } from '@rrweb/record' | ||
import { getRecordNetworkPlugin } from '../extensions/replay/external/network-recorder.plugin' | ||
import { getRecordWebSocketPlugin } from '../extensions/replay/external/websocket-recorder.plugin' | ||
|
||
assignableWindow.__PosthogExtensions__ = assignableWindow.__PosthogExtensions__ || {} | ||
assignableWindow.__PosthogExtensions__.rrwebPlugins = { | ||
getRecordConsolePlugin, | ||
getRecordNetworkPlugin, | ||
getRecordWebSocketPlugin, | ||
} | ||
assignableWindow.__PosthogExtensions__.rrweb = { record: rrwebRecord, version: 'v2' } | ||
|
||
// we used to put all of these items directly on window, and now we put it on __PosthogExtensions__ | ||
// but that means that old clients which lazily load this extension are looking in the wrong place | ||
// yuck, | ||
// so we also put them directly on the window | ||
// when 1.161.1 is the oldest version seen in production we can remove this | ||
assignableWindow.rrweb = { record: rrwebRecord, version: 'v2' } | ||
assignableWindow.rrwebConsoleRecord = { getRecordConsolePlugin } | ||
assignableWindow.getRecordNetworkPlugin = getRecordNetworkPlugin | ||
|
||
export default rrwebRecord |
Oops, something went wrong.