mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
✨ feat: Host a relay on Hetzner (#114)
We are hosting a [MoQ](https://quic.video) relay on a remote (bare metal) server on Hetzner With a lot of help from @victorpahuus
This commit is contained in:
18
packages/moq/common/download.ts
Normal file
18
packages/moq/common/download.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
// Utility function to download a Uint8Array for debugging.
|
||||
export function download(data: Uint8Array, name: string) {
|
||||
const blob = new Blob([data], {
|
||||
type: "application/octet-stream",
|
||||
})
|
||||
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
|
||||
const a = document.createElement("a")
|
||||
a.href = url
|
||||
a.download = name
|
||||
document.body.appendChild(a)
|
||||
a.style.display = "none"
|
||||
a.click()
|
||||
a.remove()
|
||||
|
||||
setTimeout(() => window.URL.revokeObjectURL(url), 1000)
|
||||
}
|
||||
Reference in New Issue
Block a user