mirror of https://github.com/jetkvm/kvm.git
Removed RemoteVirtualMediaState.WebRTC
Also removed dead go code (to make that lint happy!)
This commit is contained in:
parent
34dff0a3aa
commit
16692bc94d
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -161,7 +161,6 @@ func rpcCheckMountUrl(url string) (*VirtualMediaUrlInfo, error) {
|
|||
type VirtualMediaSource string
|
||||
|
||||
const (
|
||||
WebRTC VirtualMediaSource = "WebRTC"
|
||||
HTTP VirtualMediaSource = "HTTP"
|
||||
Storage VirtualMediaSource = "Storage"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue