watermark

npm: @playerstack/plugin-watermark

Pin a small image or text snippet to one corner of the player. Useful for brand logos, copyright lines, or attribution. Optional click-through link.

Quickstart

Image mode:

<player-stack
  src="https://youtu.be/dQw4w9WgXcQ"
  data-config='{
    "watermark": {
      "enabled": true,
      "src": "https://example.com/logo.svg",
      "position": "top-right",
      "width": 80,
      "opacity": 0.7,
      "href": "https://example.com"
    }
  }'
></player-stack>

Text mode:

<player-stack
  src="https://example.com/v.mp4"
  data-config='{ "watermark": { "enabled": true, "text": "© ACME 2026", "position": "bottom-left" } }'
></player-stack>

Config

config.watermark:

FieldTypeDefaultDescription
enabledbooleanfalsePlugin is a no-op unless true
srcstringImage URL. Mutually exclusive with text
textstringPlain-text overlay. Mutually exclusive with src
hrefstringOptional click-through URL. Must be http(s); other schemes silently ignored
position"top-left" | "top-right" | "bottom-left" | "bottom-right""bottom-right"Corner placement
opacitynumber0.70–1; out-of-range clamped, invalid falls back to default
marginnumber16Distance from corner in pixels
widthnumber80Image width in px (image mode only)

Behavior

Security

Any href that isn’t http: or https: is silently dropped — javascript:, data:, file: etc. won’t render the link wrapper. The overlay still draws.

Events

None.