Add Filter to Show Cover Image When Self-Hosted Video Ends#2292
Add Filter to Show Cover Image When Self-Hosted Video Ends#2292
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I'm having trouble getting both widgets/video/js/so-video-widget.js to output (it has a specific set of requirements) and the |
|
You were right. The requirements were too strict. Before this change, the filter would only work when I have loosened that now in I also adjusted the JS initialization so repeated That should make the filter work with the normal self-hosted video setup as well. |
Summary
sow_video_show_cover_on_endfilter (defaults tofalse) that, when enabled, resets a self-hosted video back to its poster/cover image after playback ends instead of freezing on the last frame.add_filter( 'sow_video_show_cover_on_end', '__return_true' );How it works
data-show-cover-on-endattribute to the<video>element via the existing$video_argsarray.endedevent and callsvideo.load()to reset the player to its initial state, re-displaying the poster image.Test plan
ended)🤖 Generated with Claude Code