Skip to main content

[benecaster_transcript]

transcription

An episode’s interactive transcript anywhere on the site: beside a player on a landing page, as a short preview in a blog post, or as a read-along box under an embedded episode. Registered by the Transcription Service add-on. Each timestamp jumps that episode’s player to the moment, and the line being spoken is highlighted as it plays, when the episode’s player is on the same page; without one, the timestamps are plain links.

It applies the transcript visibility itself, for the current visitor, so a block or widget that wraps it never has to. A visitor the setting excludes gets the locked state: empty while the show’s teaser is off (the default), otherwise a notice, or a notice after up to 5 lines, chosen on the show’s Transcription settings tab. A site can change or replace it with benecaster_transcript_locked_html. In full and scrollable modes a visitor who may read the transcript also gets Download the transcript: links after it, and a formatted transcript shows as paragraphs. A transcript set to Hidden shows nothing to anyone but people who can edit the episode, with no locked state. Someone who can edit the episode sees every transcript, with a note above it saying who else can read it.

It always shows the transcript of the episode’s main audio, and nothing when the episode has no finished transcript. The markup can be changed with benecaster_transcript_display_html.

The episode page shows its transcript on its own, under a Transcript heading below the show notes, and leaves it out when the show notes already carry this shortcode, so it never appears twice.

It keeps working when the show’s licence lapses or Transcription is switched off for the show: a page carrying it keeps its transcript. The Blocks & Widgets add-on’s Transcription block and widget wrap this shortcode.

Without the add-on, the shortcode prints itself. WordPress renders an unregistered shortcode as the literal text [benecaster_transcript], so guard a placement with shortcode_exists() on a site that may not have the add-on.

Parameters

Name Type Default Required Description
episode_id int (current episode) No The episode. Left out or 0: the episode being shown, on an episode page; anywhere else the shortcode outputs nothing.
mode string full No full shows every line. preview shows the first lines (see lines), then a Read the full transcript link to the episode page when lines were left out; a transcript without timestamps shows its first paragraph. scrollable shows every line in a box about 20em tall that scrolls inside itself and follows the player. Case-insensitive; anything else reads as full.
lines int 5 No How many lines preview shows, 1 to 50. 0, a non-number or nothing means 5; more than 50 means 50. Ignored by the other modes.

Example

<!-- The whole transcript of the episode being shown -->
[benecaster_transcript]

<!-- A five-line preview, linking to the episode page for the rest -->
[benecaster_transcript episode_id="42" mode="preview"]

<!-- A read-along box that follows the player on the same page -->
[benecaster_player episode_id="42"]
[benecaster_transcript episode_id="42" mode="scrollable"]