New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enhance SlidevVideo
component
#1435
Conversation
✅ Deploy Preview for slidev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
In a way, would having a video cover image be better? This option, to me, is a bit too specific and also might slow down the printing. |
timeToPrint
in SlidevVideo
imgToPrint
and timeToPrint
prop in SlidevVideo
Added an |
Thanks @KermanX for this PR! |
I had tested with a video that is not very long. I think the problem is the video not got fully loaded when exporting. I used to think that |
The real problem seems to be that the video is just not being loaded in the print mode. The |
It comes out that this is because chromium is missing some codecs. See microsoft/playwright#4585. If we run the export command with a Chrome binary, the video can be printed correctly: pnpm export --executable-path "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" |
imgToPrint
and timeToPrint
prop in SlidevVideo
SlidevVideo
Resolves #1424.
controls
(boolean
, default:false
): show the video controlsautoplay
(boolean | 'once'
, default:false
):true
or'once'
: start the video only once and does not restart it once ended or pausedfalse
: never automatically start the video (rely oncontrols
instead)autoreset
('slide' | 'click'
, default:undefined
):'slide'
: go back to the start of the video when going back to the slide'click'
: go back to the start of the video when going back to the component's click turnposter
(string | undefined
, default:undefined
):printPoster
(string | undefined
, default:undefined
):poster
when printing.timestamp
(string | number
, default:0
):printTimestamp
(string | number | 'last' | undefined
, default:undefined
):timestamp
when printing.Warning
When exporting, the video may fail to load because Chromium does not support some video formats. In this case, you can specify the executable path of the browser. See Chromium executable path for more information.