Skip to content

Commit 03e8977

Browse files
committed
refactor: 更改正确码为 100
1 parent 6c05499 commit 03e8977

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/components/BootstrapBlazor.HikVision/Components/HikVisionWebPlugin.razor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public async Task<bool> OpenSound()
280280
if (IsLogin && IsRealPlaying)
281281
{
282282
var code = await InvokeAsync<int>("openSound", Id);
283-
ret = code == 0;
283+
ret = code == 100;
284284
}
285285
return ret;
286286
}
@@ -295,7 +295,7 @@ public async Task<bool> CloseSound()
295295
if (IsLogin && IsRealPlaying)
296296
{
297297
var code = await InvokeAsync<int>("closeSound", Id);
298-
ret = code == 0;
298+
ret = code == 100;
299299
}
300300
return ret;
301301
}
@@ -311,7 +311,7 @@ public async Task<bool> SetVolume(int value)
311311
if (IsLogin && IsRealPlaying)
312312
{
313313
var code = await InvokeAsync<int>("setVolume", Id, Math.Max(0, Math.Min(100, value)));
314-
ret = code == 0;
314+
ret = code == 100;
315315
}
316316
return ret;
317317
}

src/components/BootstrapBlazor.HikVision/wwwroot/hikvision.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export async function openSound(id) {
355355
return 101;
356356
}
357357

358-
let code = 0;
358+
let code = 100;
359359
try {
360360
await WebVideoCtrl.I_OpenSound(iWndIndex);
361361
}
@@ -374,7 +374,7 @@ export async function closeSound(id) {
374374
return 101;
375375
}
376376

377-
let code = 0;
377+
let code = 100;
378378
try {
379379
await WebVideoCtrl.I_CloseSound(iWndIndex);
380380
}
@@ -398,7 +398,7 @@ export async function setVolume(id, value) {
398398
v = 50;
399399
}
400400

401-
let code = 0;
401+
let code = 100;
402402
try {
403403
await WebVideoCtrl.I_SetVolume(Math.min(100, Math.max(0, v)));
404404
}

0 commit comments

Comments
 (0)