Skip to content

Support civitai video thumbnails #495

Open
zhouyi311 wants to merge 2 commits into11cafe:mainfrom
zhouyi311:main
Open

Support civitai video thumbnails #495
zhouyi311 wants to merge 2 commits into11cafe:mainfrom
zhouyi311:main

Conversation

@zhouyi311
Copy link

@zhouyi311 zhouyi311 commented Mar 21, 2025

This PR enhances the Model Manager by adding support for video thumbnails with play-on-hover functionality. Instead of automatically playing all videos (which can be resource-intensive), videos now only play when users hover over them.

Changes
Added detection for video URLs in model thumbnails
Implemented hover state tracking for video elements
Removed autoplay attribute and replaced with programmatic play/pause on hover
Added proper error handling for video loading failures
Set videos to reset to first frame when mouse leaves

Benefits
Improved performance: Videos only consume resources when being viewed
Faster initial page load: Browser only loads video metadata and first frame initially
Better user experience: Cleaner interface with videos that respond to user interaction
Reduced bandwidth usage: Full video data is only downloaded when needed
This enhancement is particularly useful for models from Civitai that include video previews, allowing users to see animated examples of model capabilities without overwhelming browser resources.

Original:

Screenshot 2025-03-20 203601
Screenshot 2025-03-20 203641

After:

Untitled.video.-.Made.with.Clipchamp.mp4

yandujun363 added a commit to yandujun363/comfyui-workspace-manager that referenced this pull request Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants