From d79c3ee31545b1d82e5cca052838a5bf213bb74f Mon Sep 17 00:00:00 2001 From: yoanngueny Date: Wed, 29 Jun 2022 15:52:54 +0200 Subject: [PATCH] Add CanvasScreenshot to the pipeline modules The photo mode (or standard photo) wasn't working without it. It was returning `Error: Not attached to a running camera feed` --- xrextras/src/mediarecorder/record-button.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xrextras/src/mediarecorder/record-button.js b/xrextras/src/mediarecorder/record-button.js index 00a3dfe..a5757d2 100644 --- a/xrextras/src/mediarecorder/record-button.js +++ b/xrextras/src/mediarecorder/record-button.js @@ -208,6 +208,7 @@ const up = () => { const initRecordButton = () => { window.XR8.addCameraPipelineModule(XR8.MediaRecorder.pipelineModule()) + window.XR8.addCameraPipelineModule(XR8.CanvasScreenshot.pipelineModule()) document.body.insertAdjacentHTML('beforeend', htmlContent) @@ -232,6 +233,7 @@ const initRecordButton = () => { const removeRecordButton = () => { window.XR8.removeCameraPipelineModule(window.XR8.MediaRecorder.pipelineModule().name) + window.XR8.removeCameraPipelineModule(window.XR8.CanvasScreenshot.pipelineModule().name) container.parentNode.removeChild(container) flashElement.parentNode.removeChild(flashElement)