bug fixes (#116)

* bug fixes

* fix ws url
This commit is contained in:
UUBulb
2025-02-05 18:46:42 +08:00
committed by GitHub
parent dfe7d57ea4
commit 9b63e4fbda
8 changed files with 30 additions and 29 deletions
+2 -1
View File
@@ -161,7 +161,8 @@ const FMComponent: React.FC<FMProps & JSX.IntrinsicElements["div"]> = ({ wsUrl,
}
useEffect(() => {
const ws = new WebSocket(wsUrl)
const url = new URL(wsUrl, window.location.origin)
const ws = new WebSocket(url)
wsRef.current = ws
ws.binaryType = "arraybuffer"
ws.onopen = () => {