-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
WebAudio: looping audio using bufferSource.loop doesn't work #41073
Copy link
Copy link
Closed
servo/media
#476Closed
Copy link
Description
Describe the bug:
When a WebAudio's bufferSource (as from AudioContext.prototype.createBufferSource()) loop is true, then playback won't work.
To Reproduce:
Minimal test:
<!DOCTYPE html>
<script>
document.documentElement.onclick = async () => {
var file = await fetch(`https://deltarune.com/assets/audio/results.mp3`) // Replace with any MP3
var ctx = new AudioContext()
var node = ctx.createGain()
node.connect(ctx.destination)
var bufferSource = ctx.createBufferSource()
bufferSource.connect(node)
bufferSource.loopStart = 0
bufferSource.loopEnd = 3
bufferSource.loop=true
var b = await file.arrayBuffer(file)
bufferSource.buffer = await ctx.decodeAudioData(b)
bufferSource.start(0, 0, 86400)
}
</script>
When clicking the page, this plays the music on Firefox but not Servo.
Platform:
Windows 10, Servo latest.
Reactions are currently unavailable