Fetch recorder settings from website config endpoint
This commit is contained in:
1 parent
c724f42daf
commit
c6733897b4
4 files changed
+88
-18
No files matched your search
@@ -42,9 +42,7 @@ export function WebsiteReplaySettings({ websiteId }: { websiteId: string }) {
|
||||
? `${process.env.cloudUrl}/${RECORDER_NAME}`
|
||||
: `${window?.location?.origin || ''}${process.env.basePath || ''}/${RECORDER_NAME}`;
|
||||
|
||||
let recorderAttrs = `data-website-id="${websiteId}" data-sample-rate="${sampleRate}" data-mask-level="${maskLevel}" data-max-duration="${parseInt(maxDuration, 10) || 300000}"`;
|
||||
if (blockSelector) recorderAttrs += ` data-block-selector="${blockSelector}"`;
|
||||
const recorderCode = `<script defer src="${recorderUrl}" ${recorderAttrs}></script>`;
|
||||
const recorderCode = `<script defer src="${recorderUrl}" data-website-id="${websiteId}"></script>`;
|
||||
|
||||
const handleToggle = async (value: boolean) => {
|
||||
const previous = enabled;
|
||||
|
||||
Reference in new issue
Block a user