Using audio tags for rear camera video recording and BGM in aframe. When recording video, the microphone is enabled and external audio is included and the background music is not included in the video. How can I record with the microphone turned off?
Try adding the audio as a child of the camera and initialize the xrextras-capture-config
component similar to the sample project:
You can disable the microphone by adding request-mic="manual"
to the xrextras-capture-config
entity:
Thank you.
I tried like this. It works for the front camera but not for rear camera.
<a-assets>
<audio
id="bgm"
preload="auto"
class="a-sound"
src="./assets/xxx.wav"
response-type="arraybuffer"
></audio>
</a-assets>
<!-- configure capture settings -->
<xrextras-capture-config
enable-end-card="false"
max-duration-ms="13000"
request-mic="manual"
include-scene-audio="true"
></xrextras-capture-config>
<!-- add capture preview -->
<xrextras-capture-preview></xrextras-capture-preview>
<a-camera id="camera" position="0 8 8">
<a-entity sound="src: #bgm; loop: false; volume: 1.0;"></a-entity>
</a-camera>