MintGate Docs
  • Welcome to MintGate
  • Whitelabel Storefront
    • Create a White label Storefront
  • Create your Project
    • Create a Project on MintGate
    • Promoter Payouts
  • CREATORS
    • PODCAST 🎙️
    • FILM & VIDEO 📽️
    • MUSIC 🎵
    • EDUCATORS 🧑‍🏫
    • WRITERS 📰
    • And more..
  • Direct Integrations
    • Direct Integrations
    • Video SDK
    • Link Creation Widget or API
      • Other Widgets
    • Data APIs
    • Custom Link Features
      • One-Time Link Access
  • Updating MintGate
    • Updating Links + Data
    • Customizing Your Storefront
Powered by GitBook
On this page
  • Use Case Example
  • How It Works
  • Link to NPM Package (and More Details)

Was this helpful?

  1. Direct Integrations

Video SDK

Integrate token gated video directly into your custom site!

PreviousDirect IntegrationsNextLink Creation Widget or API

Last updated 3 years ago

Was this helpful?

Our video SDK enables token gated video directly on a custom Javascript site.

Use Case Example

You, as a creator, have a personal website and want to embed videos that you want a user to own an NFT to watch.

How It Works

  • Upload the videos that you want to token gate as unlisted Youtube videos.

  • Create token gated links for each video on MintGate to obtain the MintGate ID.

    • The MintGate ID is the last series of characters after go/ in the link. \

    • For example, if you created a MintGate link , the MintGate ID for the link is LkI0yVFuIW5n

  • Download the into the Javascript site.

yarn add @mintgate/mintgate-js

OR 

npm install @mintgate/mintgate-js
  • Add this code to the webpage

const linkID = 'whateveryourmintgatelinkIDforthevideois'; 

function App() {
  const ref = useRef();
  useEffect(()=> {
    if(!ref) return;

    mintgate.embedVideo(linkID, ref.current)
      .then(x=>console.log('done'));
  }, [ref]);

  return (
    <div ref={ref}></div>
  );
}

Link to NPM Package (and More Details)

NPM Package:

If you have questions or need support, message us on Discord at or email us at support@mintgate.io.

https://mgate.io/go/LkI0yVFuIW5n
NPM package
https://www.npmjs.com/package/@mintgate/mintgate-js
discord.gg/HVsbWZfrFQ