mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 17:30:07 +00:00
[fix] Enable AUDIO_RECORD widget in both LiteGraph and Vue nodes modes (#6094)
Fixed the AUDIO_RECORD widget to display correctly in both rendering modes: - Removed conflicting AUDIO_RECORD registration from ComfyWidgets that was blocking the custom widget implementation in uploadAudio.ts extension - Changed canvasOnly flags from true to false on both audioUIWidget and recordWidget to enable Vue nodes rendering - Added type override (recordWidget.type = 'audiorecord') after widget creation to enable Vue component lookup while preserving LiteGraph button rendering - Removed unused IAudioRecordWidget type definition The widget now works correctly: - LiteGraph mode: Displays as a functional button - Vue nodes mode: Displays full recording UI with waveform visualization ## Summary <!-- One sentence describing what changed and why. --> ## Changes - **What**: <!-- Core functionality added/modified --> - **Breaking**: <!-- Any breaking changes (if none, remove this line) --> - **Dependencies**: <!-- New dependencies (if none, remove this line) --> ## Review Focus <!-- Critical design decisions or edge cases that need attention --> <!-- If this PR fixes an issue, uncomment and update the line below --> <!-- Fixes #ISSUE_NUMBER --> ## Screenshots (if applicable) <!-- Add screenshots or video recording to help explain your changes --> https://github.com/user-attachments/assets/cf6513d4-0a4b-4210-88e2-a948855b5206 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6094-fix-Enable-AUDIO_RECORD-widget-in-both-LiteGraph-and-Vue-nodes-modes-28e6d73d365081faa879f53e3e2dddad) by [Unito](https://www.unito.io) --------- Co-authored-by: bymyself <cbyrne@comfy.org>
This commit is contained in:
committed by
GitHub
parent
598d170d10
commit
9ef6f94f92
@@ -1,24 +0,0 @@
|
||||
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
|
||||
import type { IAudioRecordWidget } from '@/lib/litegraph/src/types/widgets'
|
||||
import type {
|
||||
AudioRecordInputSpec,
|
||||
InputSpec as InputSpecV2
|
||||
} from '@/schemas/nodeDef/nodeDefSchemaV2'
|
||||
import type { ComfyWidgetConstructorV2 } from '@/scripts/widgets'
|
||||
|
||||
export const useAudioRecordWidget = (): ComfyWidgetConstructorV2 => {
|
||||
return (node: LGraphNode, inputSpec: InputSpecV2): IAudioRecordWidget => {
|
||||
const {
|
||||
name,
|
||||
default: defaultValue = '',
|
||||
options = {}
|
||||
} = inputSpec as AudioRecordInputSpec
|
||||
|
||||
const widget = node.addWidget('audiorecord', name, defaultValue, () => {}, {
|
||||
serialize: true,
|
||||
...options
|
||||
}) as IAudioRecordWidget
|
||||
|
||||
return widget
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user