Displays different information to users based on whether they have a subscription or not. You can use this to gate content on your website behind a subscription.

Place content you want your subscribers to see in the available slot (i.e. player links, transcripts, etc.) and content for everyone else in the unavailable slot (i.e. a sign up prompt, a login button)

supercast-gate relies on your users Supercast login state. Generally users who signed up will have a persistent cookie and will be logged in, but we recommend including a Login button (using Supercast.startLogin or Supercast.login) in the unavailable slot or elsewhere on your page so that users can authenticate if they are on a different device.

Note: This only prevents display of information to non-subscribers, and it will still be present in your HTML source. We do not recommend using this for sensitive information.

Syntax:

<supercast-gate subdomain="(your subdomain)" required-plans="(plan ids)">
  <div slot="available">
    Content for subscribers
  </div>
  <div slot="unavailable">
    Content for non-subscribers
  </div>
</supercast-gate>

Attributes:

  • subdomain - The subdomain to check for a subscription. Users must have a subscription to the channel in question to see the available slot
  • required-plans (optional) - Which plans the user needs to see the content. This is a comma-delimited list of plan ids. If omitted, any active subscription to the channel will allow viewing the content.