intro-card

npm: @playerstack/plugin-intro-card

Pre-roll splash overlay with marketing content — title, subtitle, badge, optional CTA, custom HTML, and a big branded play button. Different scope from branded-thumb: branded-thumb is “custom poster + click-to-load”, intro-card is “billboard before play”.

Quickstart

<player-stack
  src="https://example.com/v.mp4"
  data-config='{
    "controls": { "accent": "#a855f7" },
    "introCard": {
      "enabled": true,
      "badge": "FREE PREVIEW",
      "title": "Lesson 1: Kick-off",
      "subtitle": "5 minutes — what you will learn",
      "cta": { "label": "Buy the course", "url": "https://example.com/course" }
    }
  }'
></player-stack>

Config

config.introCard:

FieldTypeDefaultDescription
enabledbooleanfalsePlugin is a no-op unless true
badgestringSmall uppercase pill above the title
titlestringHeading
subtitlestringSupporting line
htmlstringArbitrary trusted HTML between subtitle and play button
cta{ label, url, utm? }Optional click-through link separate from the play button
imagestringBackground image URL
position"fullscreen" | "bottom" | "center""fullscreen"Layout: cover the whole player, sit at the bottom, or float as a centered card
theme"dark" | "light" | "transparent""dark"Background style
dismissiblebooleanfalseShow a close button so the user can skip the card without playing

Behavior

Events

NamePayloadWhen
intro-card:play-clickundefinedPlay button clicked
intro-card:cta-click{ label?: string; url?: string }CTA link clicked
intro-card:dismissundefinedClose button clicked

Security

html and cta.url are inserted as-is — treat them as trusted strings from your config provider. cta.url must be http(s); other schemes silently drop the link wrapper. CTA always opens in a new tab with rel="noopener noreferrer".

Use cases