Skip to content

Bound buffered property stops to update #7320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
izderadicka opened this issue Feb 27, 2022 · 1 comment
Closed

Bound buffered property stops to update #7320

izderadicka opened this issue Feb 27, 2022 · 1 comment

Comments

@izderadicka
Copy link

izderadicka commented Feb 27, 2022

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

@dummdidumm
Copy link
Member

Closing in favor of #7400

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants