VenuScan / Artist pages

Designer guide: build a VenuScan artist page with your own code

You can make an artist page entirely in your own HTML, CSS and JavaScript and drop VenuScan features into it: the 24-hour channel, the radio, film rentals, the fan channel pass, shows, Patreon and the mailing list. The page lives at venuscan.io/<artist-name>, and the artist switches to Own code in the page editor.

You do not need a build step, a framework or an account on anything. Any static site works.

Quick start

  1. Make a single index.html, or a folder with index.html plus CSS, JavaScript, images and fonts.
  2. In the artist page editor choose Own code, then paste the HTML or upload index.html or a .zip of the folder.
  3. Read the validation report. It lists the files that were kept, the files that were left out and why, every VenuScan tag and button it found, and any file your HTML refers to that is not in the upload.
  4. Preview the version in the editor, then press Make live. Every save is a new version; older ones can be made live again (roll back). The last 10 are kept.

A complete starting point:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Devin</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <h1>Devin</h1>

  <!-- A VenuScan feature, drawn for you -->
  <div data-venuescan="channel"></div>

  <!-- Your own button, wired to a VenuScan action -->
  <button class="my-button" data-venuescan-action="rent:devin-live">Rent the film</button>
</body>
</html>

You never add the VenuScan SDK yourself. VenuScan adds one <script src="/sdk/venuescan-v1.js"> tag to your page when it is served (if you paste one in, it is replaced, so it is never loaded twice).

Placements: features drawn where you put them

Put an empty element anywhere (a div, a section, whatever fits your layout) and give it a data-venuescan value. The SDK fills it in with live information from VenuScan. Anything you put inside the element is replaced.

Value What it shows Button inside
channel The video channel: what is on air now, a progress line, what is up next. Watch live (play:channel)
radio The radio station, same layout. Listen live (play:radio)
channel-pass The fan channel pass: price and length. Hidden if the artist has not switched passes on. Get a pass (pass)
shows Upcoming shows with a Tickets link where the artist added one. Tickets (opens the ticket site in a new tab)
release:<release-slug> A published release: cover, title, subtitle. Open release (release:<slug>)
rental:<release-slug> The film on that release: title, rental price and viewing window. Hidden if it cannot be rented. Rent (rent:<slug>)
patreon-join A Join on Patreon button. Hidden if the artist has not connected a Patreon campaign. Join on Patreon (patreon)
mailing-list A Join the mailing list button. Join the mailing list (join-list)
merch The products the artist chose for the page in their Shopify store: picture, name, price, a Buy button. Hidden if no store is connected. Buy (buy:<variant-id>)
merch:<collection-handle> The products of one Shopify collection instead (for example merch:tour-tees). Buy (buy:<variant-id>)
<div data-venuescan="shows"></div>
<div data-venuescan="release:devin-live"></div>
<div data-venuescan="rental:devin-live"></div>
<div data-venuescan="merch"></div>
<div data-venuescan="merch:tour-tees"></div>

Merch (the artist's own Shopify store)

merch draws the products from the store the artist connected on the Integrations tab: a list of .vs-merch-item cards with a picture, the name, the price (a crossed-out price when the store has a compare-at price) and a Buy button. A product with several options (sizes, colours) gets a small select so the visitor picks one first; a product that is sold out says "Sold out" instead of a button. merch:<collection-handle> shows one collection; the handle is the last part of the collection's address in the store (/collections/tour-tees), in lowercase.

Buying never happens on VenuScan: the button opens the artist's own Shopify cart for that item in a new tab, and the visitor pays on Shopify. If the store cannot be reached the placement says "Merch is unavailable right now." (data-state="error"); if no store is connected it is hidden (unavailable). VenuScan keeps the product list for five minutes, so a price change in Shopify shows up within that time. The artist's access token is never sent to your page: the data your page receives is only what the store already shows shoppers.

To make your own Buy button, use the action buy:<variant-id> below. The variant id is the number in the store's cart link (https://store/cart/44556677:1 is variant 44556677); the placement's buttons already use the right ones.

The <release-slug> is the last part of the release address (venuscan.io/a/devin/devin-live has the slug devin-live). Slugs use lowercase letters, numbers and hyphens.

A placement that has nothing to show (no channel, no offer) gets data-state="unavailable" and is hidden by the default style. The states you can style are loading, available, on-air, off-air, empty and unavailable.

The data refreshes every 20 seconds while the page is visible, so the "on air now" line stays right.

Actions: your own buttons

Any element can trigger a VenuScan action: a button, a link, a card, an image. Add data-venuescan-action.

Value What happens
play:channel Tunes the video channel in the VenuScan player.
play:radio Tunes the radio in the VenuScan player.
rent:<release-slug> Starts checkout for that release's film (or plays it if the visitor already has it).
pass Starts checkout for the fan channel pass.
join-list Opens the VenuScan mailing-list form.
patreon Opens the artist's Patreon join page in a new tab.
release:<release-slug> Opens the release page in a new tab.
buy:<variant-id> Opens the artist's Shopify cart with that product variant in a new tab. The id must be a number and must belong to a product in the artist's connected store; anything else is refused.
<a href="#" class="cta" data-venuescan-action="play:channel">Watch the live channel</a>
<button data-venuescan-action="pass">Get a 7-day pass</button>
<img src="poster.jpg" alt="Rent the film" data-venuescan-action="rent:devin-live">
<button data-venuescan-action="buy:44556677">Buy the tour tee</button>

What happens next always happens in VenuScan's own code, outside your page: the player appears as a dock at the bottom of the window, checkout is a full-page redirect to Stripe, the mailing-list form is a VenuScan dialog, a merch purchase opens the artist's Shopify store in a new tab. Who may play what is decided by VenuScan's servers (membership level, pass, rental), not by your page.

From JavaScript you can do the same thing: window.venuescan.action("play:channel").

Styling the placements

The SDK adds a very small default style with zero specificity, so any rule you write wins, without !important and whatever order your stylesheets load in. Style the class names below, or replace them entirely.

Custom properties you can set on the placement or on :root:

Property Default Use
--vs-accent currentColor Live dot, progress bar, hover fill
--vs-radius 8px Buttons, covers
--vs-gap .75rem Space between parts

Class names:

Class Where
.vs-widget Every placement.
.vs-channel, .vs-radio, .vs-pass, .vs-shows, .vs-release, .vs-rental, .vs-patreon, .vs-list The placement type.
.vs-kicker Small label above a block (lane name, "Channel pass").
.vs-now, .vs-now-label, .vs-live-dot, .vs-now-title, .vs-now-sub, .vs-progress Channel and radio: the on-air block. The progress bar is the <i> inside .vs-progress.
.vs-next, .vs-next-label, .vs-next-list, .vs-next-item, .vs-next-time, .vs-next-title The up-next list.
.vs-btn Every button the SDK draws (also .vs-play, .vs-show-tickets).
.vs-price, .vs-meta, .vs-title, .vs-subtitle, .vs-cover Pass, release and rental details.
.vs-show-list, .vs-show, .vs-show-date, .vs-show-where, .vs-show-venue, .vs-show-city Shows.
.vs-merch, .vs-merch-list, .vs-merch-item, .vs-merch-img, .vs-merch-title, .vs-merch-price, .vs-merch-size, .vs-merch-buy, .vs-sold-out Merch. .vs-merch-img.is-sold is the picture of a sold-out product; .vs-merch-price s is the crossed-out price.
.vs-empty, .vs-placeholder Empty and loading states.
.vs-channel { border: 1px solid #fff3; padding: 2rem; font-family: "Fraunces", serif; }
.vs-now-title { font-size: 2.4rem; letter-spacing: -.02em; }
.vs-btn { background: #d6f32f; color: #000; border: 0; border-radius: 999px; }
.vs-btn:hover { background: #fff; }

Fonts and images from your zip work as normal. External fonts (Google Fonts and similar) work too.

Reacting to what is playing

The VenuScan page around your site tells it what is playing, and nothing else (no names, no emails, no tokens). You can use it to change your design while the channel plays.

  • The <html> element gets data-vs-playing="channel" | "radio" | "track" | "" and data-vs-status="idle" | "loading" | "playing" | "paused" | "error".
  • Any data-venuescan-action="play:channel" (or play:radio) element gets the class vs-is-playing and aria-pressed="true" while that is playing.
  • A venuescan:state event fires on window: window.addEventListener("venuescan:state", e => console.log(e.detail)) where e.detail is { playing, status }.
  • Or: window.venuescan.onState(({ playing, status }) => { ... }), and window.venuescan.state() for the current value.
html[data-vs-status="playing"] .hero { animation-play-state: paused; }
.vs-is-playing { background: #d6f32f; color: #000; }

The raw messages (for the curious)

You do not need these; the SDK does it for you. Your page and VenuScan talk with postMessage.

From your page to VenuScan (only these two exist; anything else is ignored):

{ type: "venuescan:action", action: "play", target: "channel", v: 1 }
{ type: "venuescan:ready", v: 1 }

action is one of play, rent, release, pass, join-list, patreon, buy. target is channel or radio for play, a release slug for rent and release, a number (the Shopify variant id) for buy, and absent for the rest. Extra fields, bad targets, oversized messages and more than 8 actions in 10 seconds are dropped.

From VenuScan to your page:

{ type: "venuescan:state", v: 1, playing: "channel", status: "playing" }

Limits

Zip size 25 MB
Files in a zip 1,000
One file 10 MB
Everything unpacked 120 MB
Pasted HTML 2 MB
Allowed file types html, css, js, mjs, json, svg, png, jpg, jpeg, gif, webp, avif, woff, woff2, ttf, otf, mp3, mp4, webm, txt, ico

index.html must be at the top of the zip, or inside the zip's single top-level folder. File names may use letters, numbers, spaces and . _ - ( ) @ + = , ~; no hidden files (starting with a dot). Use relative paths in your HTML (css/site.css, not /css/site.css): a path starting with / points at venuscan.io, not at your files, and the validation report flags it. Mac __MACOSX folders and .DS_Store files are ignored.

A zip is refused outright if it contains a path that goes up a folder (..), an absolute path, a backslash path or a symbolic link. A file with a type that is not allowed (a .php, an .exe) is skipped and listed in the report; the rest still uploads.

Video and audio files in the zip play from VenuScan's servers and support seeking. For long films use the channel and rentals instead: they are metered and protected, files in your zip are not.

Security, in plain language

Your code runs, but it cannot reach anything of VenuScan's or the visitor's.

  • Your files are served with a rule (Content-Security-Policy: sandbox) that makes the browser treat them as coming from nowhere in particular. This holds even if someone opens a file's address directly in a tab.
  • So your JavaScript cannot read visitors' VenuScan cookies, cannot read or write localStorage or sessionStorage, cannot call VenuScan's APIs as the visitor, and cannot read the page around it.
  • Things that normally work but do not here: localStorage, sessionStorage, document.cookie, IndexedDB (they throw an error, so wrap them in try/catch or your script stops), alert() / confirm() / prompt() (ignored), changing the address of the whole window (top.location), and forms that post to VenuScan.
  • Links with target="_blank" open in a new tab as usual. Forms may submit to your own services. fetch to other sites works if they allow it (CORS).
  • Real work is done by VenuScan outside your page: the player, checkout and sign-in. A visitor's playback tokens, purchases and email are never given to your page. Your page only learns what is playing.
  • A merch Buy button sends only a number. VenuScan checks it against the artist's own store and builds the cart address itself, so your code can never send a visitor to an address of its own choosing through it. The store's access token stays on VenuScan's server.
  • VenuScan counts visits and button presses (page view, and each action with its target; a Buy is counted as a merch click for that product, not as a sale, since the purchase happens on Shopify) with the page's referrer and utm_ campaign parameters. It does not record location. Your own analytics scripts will run in the sandbox without cookies or storage; most will not work, so use the VenuScan numbers.
  • Do not put secrets in your files. Anyone can read them.

Troubleshooting

  • A placement shows "VenuScan is not reachable right now." The data request failed; reload. If the page is not published yet, publish it in the editor.
  • A placement is empty or missing. It has data-state="unavailable": no channel for channel or radio, no pass offer for channel-pass, no rental for rental:…. Check the artist's setup, or the release slug.
  • The merch placement says "Merch is unavailable right now." VenuScan could not reach the artist's Shopify store (or the access token was revoked). The artist sees "Needs attention" on the Integrations tab; the products come back by themselves once Shopify answers.
  • A Buy button says the product is not available. The variant id is not a product in the artist's store, or it is sold out. Use the placement's own buttons, or copy the number from the store's cart link.
  • A button does nothing. Check the value matches the table above exactly (lowercase). The validation report lists unknown values.
  • My script stops with a SecurityError. It touched localStorage, sessionStorage or document.cookie. Wrap those calls in try/catch.
  • Images or CSS are missing. The validation report lists references to files that are not in the upload. Check the path and the capitalisation: Hero.jpg and hero.jpg are different files.
  • The preview works but the public page shows the Builder design. The page is in Own code mode but no version is live yet. Press Make live.