mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-09-13 02:54:26 +08:00
feat: 新增 MJPEG/H.264 VNC 初步支持
This commit is contained in:
@@ -171,6 +171,7 @@ export const extensionsApi = {
|
||||
|
||||
export interface RustDeskConfigResponse {
|
||||
enabled: boolean
|
||||
codec: 'h264' | 'h265'
|
||||
rendezvous_server: string
|
||||
relay_server: string | null
|
||||
device_id: string
|
||||
@@ -187,6 +188,7 @@ export interface RustDeskStatusResponse {
|
||||
|
||||
export interface RustDeskConfigUpdate {
|
||||
enabled?: boolean
|
||||
codec?: 'h264' | 'h265'
|
||||
rendezvous_server?: string
|
||||
relay_server?: string
|
||||
relay_key?: string
|
||||
@@ -271,6 +273,50 @@ export const rtspConfigApi = {
|
||||
stop: () => request<RtspStatusResponse>('/config/rtsp/stop', { method: 'POST' }),
|
||||
}
|
||||
|
||||
export type VncEncoding = 'tight_jpeg' | 'h264'
|
||||
|
||||
export interface VncConfigResponse {
|
||||
enabled: boolean
|
||||
bind: string
|
||||
port: number
|
||||
encoding: VncEncoding
|
||||
jpeg_quality: number
|
||||
allow_one_client: boolean
|
||||
has_password: boolean
|
||||
}
|
||||
|
||||
export interface VncConfigUpdate {
|
||||
enabled?: boolean
|
||||
bind?: string
|
||||
port?: number
|
||||
encoding?: VncEncoding
|
||||
jpeg_quality?: number
|
||||
allow_one_client?: boolean
|
||||
password?: string
|
||||
}
|
||||
|
||||
export interface VncStatusResponse {
|
||||
config: VncConfigResponse
|
||||
service_status: string
|
||||
connection_count: number
|
||||
}
|
||||
|
||||
export const vncConfigApi = {
|
||||
get: () => request<VncConfigResponse>('/config/vnc'),
|
||||
|
||||
update: (config: VncConfigUpdate) =>
|
||||
request<VncConfigResponse>('/config/vnc', {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(config),
|
||||
}),
|
||||
|
||||
getStatus: () => request<VncStatusResponse>('/config/vnc/status'),
|
||||
|
||||
start: () => request<VncStatusResponse>('/config/vnc/start', { method: 'POST' }),
|
||||
|
||||
stop: () => request<VncStatusResponse>('/config/vnc/stop', { method: 'POST' }),
|
||||
}
|
||||
|
||||
export type WebConfig = WebConfigResponse
|
||||
|
||||
export type { WebConfigUpdate }
|
||||
|
||||
Reference in New Issue
Block a user