For videos etc.
What should these component specifically do? Wouldn't using a provided embed code suffice?
I think we'll want a scalable/resizable version, something like this but for fullscreen: https://github.com/jxnblk/rebass/blob/master/src/Embed.js
A more video-centric extension of this could also have an autoplay attribute, hook into the SlideDeck context and start playing when the slide comes into view – and pause when the slide leaves the view
This will be awesome. I really like the included fullscreen Image component - having one for videos would be very helpful. Thanks for such a great library!
@jxnblk The link to rebass no longer works :(
Updated Rebass link: https://rebass-v2.now.sh/components/Embed
For now, this seems to be a workaround (dangerouslySetInnerHTML for autoplay with muted in Chrome, see facebook/react#10389):
<div
dangerouslySetInnerHTML={{
__html: `
<video
style="max-width: 80%"
controls
autoplay
muted
src="./screencapture.mp4"
/>
`,
}}
/>
@jxnblk Why was this closed? Has this been implemented in v3?
I has not been implemented, but I'm planning on opening a new issue with a clearer specification
Ok sounds good, thanks for the info.
Most helpful comment
A more video-centric extension of this could also have an autoplay attribute, hook into the SlideDeck context and start playing when the slide comes into view – and pause when the slide leaves the view