Giter VIP home page Giter VIP logo

Comments (10)

jxnblk avatar jxnblk commented on July 16, 2024 2

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

from mdx-deck.

jxnblk avatar jxnblk commented on July 16, 2024 2

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

from mdx-deck.

karlhorky avatar karlhorky commented on July 16, 2024 2

For now, this seems to be a workaround (dangerouslySetInnerHTML for autoplay with muted in Chrome, see facebook/react#10389):

import screencapture from './screencapture.mp4';

<div
  dangerouslySetInnerHTML={{
    __html: `
      <video
        style="max-width: 80%"
        controls
        autoplay
        muted
        src="${screencapture}"
      />
    `,
  }}
/>

Older versions of mdx-deck don't use the import:

<div
  dangerouslySetInnerHTML={{
    __html: `
      <video
        style="max-width: 80%"
        controls
        autoplay
        muted
        src="./screencapture.mp4"
      />
    `,
  }}
/>

from mdx-deck.

busypeoples avatar busypeoples commented on July 16, 2024

What should these component specifically do? Wouldn't using a provided embed code suffice?

from mdx-deck.

trevordmiller avatar trevordmiller commented on July 16, 2024

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!

from mdx-deck.

SaraVieira avatar SaraVieira commented on July 16, 2024

@jxnblk The link to rebass no longer works :(

from mdx-deck.

jxnblk avatar jxnblk commented on July 16, 2024

Updated Rebass link: https://rebass-v2.now.sh/components/Embed

from mdx-deck.

karlhorky avatar karlhorky commented on July 16, 2024

@jxnblk Why was this closed? Has this been implemented in v3?

from mdx-deck.

jxnblk avatar jxnblk commented on July 16, 2024

I has not been implemented, but I'm planning on opening a new issue with a clearer specification

from mdx-deck.

karlhorky avatar karlhorky commented on July 16, 2024

Ok sounds good, thanks for the info.

from mdx-deck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.