Removed RemoteVirtualMediaState.WebRTC

Also removed dead go code (to make that lint happy!)
This commit is contained in:
Marc Brooks 2025-08-28 13:48:11 -05:00
parent 34dff0a3aa
commit 16692bc94d
No known key found for this signature in database
GPG Key ID: 583A6AF2D6AE1DC6
3 changed files with 1 additions and 8 deletions

View File

@ -22,17 +22,11 @@ func (r remoteImageBackend) ReadAt(p []byte, off int64) (n int, err error) {
return 0, errors.New("image not mounted")
}
source := currentVirtualMediaState.Source
mountedImageSize := currentVirtualMediaState.Size
virtualMediaStateMutex.RUnlock()
_, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
readLen := int64(len(p))
if off+readLen > mountedImageSize {
readLen = mountedImageSize - off
}
switch source {
case HTTP:
return httpRangeReader.ReadAt(p, off)

View File

@ -375,7 +375,7 @@ export const useSettingsStore = create(
);
export interface RemoteVirtualMediaState {
source: "WebRTC" | "HTTP" | "Storage" | null;
source: "HTTP" | "Storage" | null;
mode: "CDROM" | "Disk" | null;
filename: string | null;
url: string | null;

View File

@ -161,7 +161,6 @@ func rpcCheckMountUrl(url string) (*VirtualMediaUrlInfo, error) {
type VirtualMediaSource string
const (
WebRTC VirtualMediaSource = "WebRTC"
HTTP VirtualMediaSource = "HTTP"
Storage VirtualMediaSource = "Storage"
)