mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
Add support for webm video from SaveWEBM node (#3132)
This commit is contained in:
@@ -41,4 +41,55 @@ describe('TaskItemImpl', () => {
|
||||
expect(taskItem.outputs['node-1'].images).toBeDefined()
|
||||
expect(taskItem.outputs['node-1'].images[0].filename).toBe('test.png')
|
||||
})
|
||||
|
||||
it('should recognize webm video from core', () => {
|
||||
const taskItem = new TaskItemImpl(
|
||||
'History',
|
||||
[0, 'prompt-id', {}, {}, []],
|
||||
{ status_str: 'success', messages: [] },
|
||||
{
|
||||
'node-1': {
|
||||
video: [{ filename: 'test.webm', type: 'output', subfolder: '' }]
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const output = taskItem.flatOutputs[0]
|
||||
|
||||
expect(output.htmlVideoType).toBe('video/webm')
|
||||
expect(output.isVideo).toBe(true)
|
||||
expect(output.isWebm).toBe(true)
|
||||
expect(output.isVhsFormat).toBe(false)
|
||||
expect(output.isImage).toBe(false)
|
||||
})
|
||||
|
||||
// https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite/blob/0a75c7958fe320efcb052f1d9f8451fd20c730a8/videohelpersuite/nodes.py#L578-L590
|
||||
it('should recognize webm video from VHS', () => {
|
||||
const taskItem = new TaskItemImpl(
|
||||
'History',
|
||||
[0, 'prompt-id', {}, {}, []],
|
||||
{ status_str: 'success', messages: [] },
|
||||
{
|
||||
'node-1': {
|
||||
gifs: [
|
||||
{
|
||||
filename: 'test.webm',
|
||||
type: 'output',
|
||||
subfolder: '',
|
||||
format: 'video/webm',
|
||||
frame_rate: 30
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const output = taskItem.flatOutputs[0]
|
||||
|
||||
expect(output.htmlVideoType).toBe('video/webm')
|
||||
expect(output.isVideo).toBe(true)
|
||||
expect(output.isWebm).toBe(true)
|
||||
expect(output.isVhsFormat).toBe(true)
|
||||
expect(output.isImage).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user