Description
Describe the bug
I do have this binding on audio
element like this :
<script type="ts">
let player;
let buffered;
<script>
<audio
bind:buffered
bind:this={player}
...
/>
In Firefox after short moment after playback starts buffered variable stops to follow updated on player buffered data. It works for for first few updates, but then it stops updating. In Chromium it works better, but I've seen similar problem occationally.
When I later stop the code via breakpoint I see following situation in console (ogg with opus codec):
buffered
Array [ {…} ]
0: Object { start: 0, end: 591.9935 }
length: 1
<prototype>: Array []
player.buffered
TimeRanges { length: 1 }
on:error={playerError}
on:ended={tryNextFile}
player.buffered.end(0)
3021.466125
or (mp3)
buffered
Array [ {…} ]
0: Object { start: 0, end: 1339.849624 }
length: 1
<prototype>: Array []
player.buffered
TimeRanges { length: 1 }
player.buffered.end(0)
2437.757284
As you can see bound buffered variable is significantly difference between player.buffered and bound buffered variable, which should be the same.
Reproduction
On firefox create audio element with binding to of buffered property to buffered
variable, set source to opus.
Check if it follows current playback position an also it should be same as buffered
property of appropriate HTMLAudioElement.
Logs
No response
System Info
On Ubuntu 20.04
Firefox 97.0
------ envinfo ---
$ npx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers
npx: installed 1 in 0.976s
System:
OS: Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)
CPU: (4) x64 Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
Memory: 461.27 MB / 15.39 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 14.19.0 - /usr/bin/node
Yarn: 1.22.11 - /usr/bin/yarn
npm: 6.14.16 - /usr/bin/npm
Browsers:
Firefox: 97.0
npmPackages:
rollup: ^2.68.0 => 2.68.0
svelte: ^3.46.4 => 3.46.4
Severity
annoyance