docs
/
Building on Appmint

Content Player

How your site plays posts — blog posts, galleries, courses, applications and trainings — page by page, with progress, conditions, review and preview.

Posts written in Content Studio play on your site in the Content Player. It handles a single blog post or gallery, a course like Udemy's, a staff training, a study guide with coursework that a teacher marks, and a multi-step application such as a home loan — one player, driven by the post.

Turning it on

The player is a Site Features row, like Blog and Forms: Content Player (key content-player). It takes a page.

  • On — the site answers /content-player/<post>/<page>. If you pick a page for the row, that page's name is the address instead (/<your page>/<post>/<page>), and the page is the template: its header and footer wrap the player.
  • Off — the address claims nothing; it is an ordinary page if one has that name, otherwise the site's not-found page.

Only published posts play. Edits made after publishing wait until you publish again.

What a visitor sees

AddressView
/content-playerMy programs — everything the signed-in person has started, with % and due dates
/content-player/<post>The post: cover, summary, outline, and Start, Continue, Sign in to start or Look inside
/content-player/<post>/<page>One page, with Back, Mark complete and Continue under it

A one-page post — a blog post, a gallery — opens straight to its page, with no outline or footer.

How the outline sits is the post's own setting:

navigationLooks like
sidebarAn outline beside the page: sections you can collapse, each with done / total, and a type and duration on every page. The default for courses and trainings
topA numbered stepper across the top — Step 2 of 7. The default for applications and forms (layout: steps)
noneNo outline — progress, Back and Continue only

Locked pages show a lock and why (Score at least 50 on "Quiz" first).

Sign-in and progress

  • Reading needs nobody. Anyone the post's access rules let in can open its unlocked pages.
  • Saving needs a person. Marking a page complete, sending answers or reporting watched time asks a signed-out visitor to sign in and brings them back. A signed-in person's first save enrolls them.
  • Progress is kept per person per post (post_progress); answers are kept as form submissions. Coming back to a page, the form reopens filled in with what was sent.
  • Access code, invitation (participants) and authentication rules come from the post's Settings — the same rules as a CRM form.

The page contract

Content Studio's blocks write a few attributes into a page's HTML. The player acts on them, so pages you write by hand can use them too.

MarkupDoes
<form data-program-answer>Sends its fields in as the page's answer. Files upload first; the page is then done — or waits for its reviewers
data-program-progress="done" on a buttonFinishes the page (I've read it)
data-program-progress="watched" on <video>, <audio> or a YouTube / Vimeo <iframe>Reports how much was watched, and finishes the page at the end unless the page also has an answer form

Quizzes are marked 0–100 against the answers kept on the page record; a condition such as score at least 70 opens what comes after.

Review

A page with Reviewers is not done when sent in: it shows Sent in — waiting for review, and the reviewer sees it in Content Studio's Waiting for review with what was sent. Approve finishes it; Request changes sends it back with a note the person sees on the page. Conditions such as is approved open what follows.

Preview

Staff preview a post at /__preview/post/<slug or id> and a page at /__preview/page/<site name>/<page name, slug or id>. Both answer on every site, whatever Site Features says. A post preview opens every page, records nothing, and notes when a learner would get each locked page. Its link carries a one-hour key for that post, made by the content studio's Preview button; nobody's sign-in is in the link.

In code

The runtime exposes the player as window.appmint.contentPlayer; the post, page and code come from the address when you leave them out.

<button data-action="contentPlayer.complete">Mark complete</button>
<form data-action="contentPlayer.answer" data-payload="form">…</form>
MethodDoes
mine()My programs
outline()The post, its outline with each page's status, and my progress
enroll()Start
item()One page, its neighbours and my saved answer
complete()Finish this page
progress({ percent }) / progress({ score })Report watched % or a score
answer(values) / saveDraft(values)Send the page's answer, or keep it as a draft

Behind them is the customer API client/content-studio/* — see Endpoints.