slidev icon indicating copy to clipboard operation
slidev copied to clipboard

`<video>` and presenter mode

Open pomber opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. When you include a <video> in your slide you have to either:

  • autoPlay: which has a few problems (the video starts autoplaying in the presenter next slide preview, it also starts autoplaying in the play view before the slide is selected)
  • autoPlay="false": you can't control the video from the presenter mode

Describe the solution you'd like Maybe a built-in Video component with a smarter autoPlay and controls that sync the video playback between presenter and play mode.


Related: #339 #124

pomber avatar Sep 01 '22 10:09 pomber

Sounds like a good idea. Open for PR :)

antfu avatar Sep 03 '22 06:09 antfu

Sounds like a good idea. Open for PR :)

I may give it a try after I finish my talk. Let me know if there's a similar component or something I could use as a reference.

pomber avatar Sep 04 '22 20:09 pomber

For the implementation, I would (first) consider something like https://css-tricks.com/a-few-functional-uses-for-intersection-observer-to-know-when-an-element-is-in-view/ (see use case 2 for instance).

twitwi avatar Sep 07 '22 12:09 twitwi