Hello everyone,
I hope you’re all doing well. I’m currently working on a project where I’d like to play a sound during video recording with 8th Wall. For this, I’ve cloned the photo-Aframe project from 8th Wall and tried to integrate a feature to play music.
However, I’m encountering an issue: my music doesn’t play as expected during the recording. Here’s a snippet of my code:
const musique = new Audio('link_to_your_music.mp3')
XRExtras.MediaRecorder.configure({
onProcessFrame: ({ctx}) => {
// code to add a photo frame
},
})
XRExtras.MediaRecorder.mediarecorder.onstart = () => {
musique.play()
}
XRExtras.MediaRecorder.mediarecorder.onstop = () => {
musique.pause()
musique.currentTime = 0
}
I’ve tried to play the music when the recording starts (mediarecorder.onstart
) and stop it when the recording ends (mediarecorder.onstop
), but it doesn’t seem to work.
Do you have any suggestions or advice on what I could do to solve this issue? Any help would be greatly appreciated.
Thank you in advance for your time and assistance.