From a0f13e2c7e359e588a125c3b0a7fa5649e716b7e Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 23:19:31 +0530 Subject: [PATCH] feat: start RB record session --- server/src/routes/record.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/src/routes/record.ts b/server/src/routes/record.ts index e830ef36..dbac1646 100644 --- a/server/src/routes/record.ts +++ b/server/src/routes/record.ts @@ -24,3 +24,17 @@ router.all('/', (req, res, next) => { next() // pass control to the next handler }) +/** + * GET endpoint for starting the remote browser recording session. + * returns session's id + */ +router.get('/start', (req, res) => { + const id = initializeRemoteBrowserForRecording({ + browser: chromium, + launchOptions: { + headless: true, + } + }); + return res.send(id); +}); +