...
This commit is contained in:
@@ -178,12 +178,12 @@
|
||||
|
||||
<!-- Audio Recording Button -->
|
||||
<Button Color="@(IsRecording ? ButtonColor.Danger : ButtonColor.Secondary)"
|
||||
Size=ButtonSize.Small
|
||||
Outline="true"
|
||||
@onclick="ToggleAudioRecording"
|
||||
class=@($"audio-btn {(IsRecording ? "recording" : "")}")
|
||||
title="@(IsRecording ? "توقف ضبط" : "ضبط صدا")"
|
||||
>
|
||||
Size=ButtonSize.Small
|
||||
Outline="true"
|
||||
@onclick="ToggleAudioRecording"
|
||||
class=@($"audio-btn {(IsRecording ? "recording" : "")}")
|
||||
title="@(IsRecording ? "توقف ضبط" : "ضبط صدا")"
|
||||
>
|
||||
@if (IsRecording)
|
||||
{
|
||||
<Icon Name="IconName.StopCircle" Class="recording-pulse" />
|
||||
@@ -370,6 +370,7 @@
|
||||
IsRecording = false;
|
||||
recordingTimer?.Dispose();
|
||||
recordingTimer = null;
|
||||
await ClearSelectedImage();
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
@@ -701,6 +702,7 @@
|
||||
await file.OpenReadStream().CopyToAsync(memoryStream);
|
||||
SelectedImageBytes = memoryStream.ToArray();
|
||||
SelectedImagePreview = $"data:{file.ContentType};base64,{Convert.ToBase64String(SelectedImageBytes)}";
|
||||
await ClearRecordedAudio();
|
||||
}
|
||||
|
||||
private Task ClearSelectedImage()
|
||||
|
Reference in New Issue
Block a user