Mdx-deck: Video component

Created on 29 Jul 2018  Â·  10Comments  Â·  Source: jxnblk/mdx-deck

For videos etc.

enhancement

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

All 10 comments

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 :(

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Irev-Dev picture Irev-Dev  Â·  4Comments

jxnblk picture jxnblk  Â·  4Comments

wpannell picture wpannell  Â·  4Comments

zz1211 picture zz1211  Â·  7Comments

millette picture millette  Â·  3Comments