You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can anyone provide guidance into how to use the Plugin Canvas Web correctly?
I also have rrweb working correctly, so that it sends all the information it collects to a Golang server that dumps the information into a SQLite database. But I want to test out the Plugin for Canvas record, however the examples provided in the Readme file of the Plugin seems to be very specific in sending the data straight to Replay.
Can anyone provide guidance into how to use the Plugin Canvas Web correctly?
I also have rrweb working correctly, so that it sends all the information it collects to a Golang server that dumps the information into a SQLite database. But I want to test out the Plugin for Canvas record, however the examples provided in the Readme file of the Plugin seems to be very specific in sending the data straight to Replay.
This is what I have so far: `<script type="module">
import rrweb from 'https://cdn.jsdelivr.net/npm/rrweb@latest/dist/rrweb.min.js';
import rrwebPluginCanvasWebRTCRecord from 'https://cdn.jsdelivr.net/npm/rrweb-plugin-canvas-webrtc-record@latest/dist/index.es.js';
let events = [];
// Initialize the plugin correctly
const canvasWebRTCPlugin = rrwebPluginCanvasWebRTCRecord();
// Start recording
let stopRecording = rrweb.record({
emit(event) {
events.push(event);
},
plugins: [canvasWebRTCPlugin], // Register the plugin
recordCanvas: false, // Enable canvas recording
checkoutEveryNth: 200, // Optional: helps segment recordings
});
// Function to send recorded events to backend
function save() {
const body = JSON.stringify({ events });
events = [];
fetch('/rrwcapture', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body,
});
}
// Save every 5 seconds
setInterval(save, 5000);
</script>`
Anyone have the correct way of using this plugin?
The text was updated successfully, but these errors were encountered: