In scene audio error

Hey Everyone,
I have an audio being played in the experience and also have capture button to capture the video of the whole experience.
But the problem is, the added audio(.mp3) is not being played in the recorded(captured) video despite of adding “include-scene-audio=“true”” in the code.
Have added a screenshot for better understanding, please have a look.

Thank you in advance.

How are you loading in your .mp3 file?

Just for more information (I know you are using .mp3 over video but thought I’d share this)

Capturing audio in the scene can be tricky, especially when trying to capture audio from a video texture.
We have a sample project demonstrating how to include scene audio in A-Frame with MediaRecorder, which is done with xrextras-capture-config and . Unfortunately, a video texture is not considered “scene audio”. As a workaround, I suggest following the same approach as the sample project and manually playing the sound via its own entity and muting the video track itself.
For example:

<a-scene>
  <a-assets>
    <video id="video" src="./assets/video-sound.mp4" muted></video>
    <audio id="audio" src="./assets/video-sound.mp4"></audio>
  </a-assets>

  <xrextras-capture-config request-mic="manual" ...></xrextras-capture-config>

  <a-camera position="0 1 2">
    <a-entity sound="src: #audio"></a-entity>
  </a-camera>
 
  <a-box material="src: #video"></a-box>
</a-scene>
const playVideo = () => {
  const video = document.getElementById('video')
  const audio = document.querySelector('[sound]')
  audio.components.sound.playSound()
  video.play()
}
window.addEventListener('click', playVideo)

You can disable the microphone by adding request-mic=“manual” to the xrextras-capture-config entity: 8th Wall.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.