feat: start RB record session
This commit is contained in:
@@ -24,3 +24,17 @@ router.all('/', (req, res, next) => {
|
|||||||
next() // pass control to the next handler
|
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);
|
||||||
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user