diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-05-30 00:24:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-30 00:24:01 +0300 |
commit | 7b3916c8cc8fc21127b80b9732e047b5549333a9 (patch) | |
tree | ec4a967d3d4307e8229062ad67e42ca1668ee701 /src/view/com/util/post-embeds/VideoEmbedInner/bandwidth-estimate.ts | |
parent | bc42d26bc519a26bb94bddc21fa1001b74afea25 (diff) | |
download | voidsky-7b3916c8cc8fc21127b80b9732e047b5549333a9.tar.zst |
Share bandwidth estimate between video instances (#8377)
Diffstat (limited to 'src/view/com/util/post-embeds/VideoEmbedInner/bandwidth-estimate.ts')
-rw-r--r-- | src/view/com/util/post-embeds/VideoEmbedInner/bandwidth-estimate.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/view/com/util/post-embeds/VideoEmbedInner/bandwidth-estimate.ts b/src/view/com/util/post-embeds/VideoEmbedInner/bandwidth-estimate.ts new file mode 100644 index 000000000..122e10aef --- /dev/null +++ b/src/view/com/util/post-embeds/VideoEmbedInner/bandwidth-estimate.ts @@ -0,0 +1,11 @@ +let latestBandwidthEstimate: number | undefined + +export function get() { + return latestBandwidthEstimate +} + +export function set(estimate: number) { + if (!isNaN(estimate)) { + latestBandwidthEstimate = estimate + } +} |