Skip to content

Conversation

Jeffrey0117
Copy link

This PR adds support for pause=[1,2,3,'end'] format in SlidevVideo component.

The video now plays segment-by-segment with user click between segments.
Supports fractional seconds like [3.5, 2.5, 3]
Ends with autoplay or manually controlled 'end' keyword.

Fixes #2177 - Clickable Video

Copy link

netlify bot commented Aug 2, 2025

Deploy Preview for slidev failed.

Name Link
🔨 Latest commit e26ddc6
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/68a2d119afc2bc0008a3718b

@Jeffrey0117
Copy link
Author

Hi, I've added support for segmented video playback with the pause=[1,2,3,'end'] format.
This addresses #2177 and allows better interactivity with videos in slides. Tested with fractional durations and multiple use cases. Let me know if anything needs adjustment!

README.md Outdated
### Init Project Locally

Install [Node.js >=18](https://nodejs.org/) and run the following command:
# 🎬 SlidevVideo Playback Demo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this file has been changed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Anthony, thanks for the feedback!
I thought I was only editing my fork, so I put the demo into the README for quick testing.
Now I understand it should go into the docs and in English.

I’ll move the content into the docs and update the PR. Thanks for pointing it out!

dev.md Outdated
# 🎬 SlidevVideo Demo

> A demo for multi-step controlled playback using `pause=[1, 2, 3, 'end']`
> 使用 `pause=[1, 2, 3, 'end']` 控制多段播放的展示
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the docs instead? And use English, please. Thanks

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, I’ll move the demo into the docs in English and update the PR soon.

@Jeffrey0117
Copy link
Author

Hi, I’ve updated the PR — reverted the README changes and added a new English docs page for the video playback demo.
Please let me know if there’s anything else I should adjust. Thanks a lot for your guidance!

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.

Clickable Videos
3 participants