Skip to content
WordPress

WordPress quickstart

Two ways to play a Transcodely video on WordPress:

  • Without a plugin: paste the video’s embed code into a Custom HTML block. Works for public and unlisted videos, on any WordPress site.
  • With the Transcodely Video plugin (beta): a block and a shortcode, private videos for the logged-in visitors you choose, and lessons marked complete in Tutor LMS or LifterLMS once the video has been played.

Without a plugin

  1. In the Transcodely dashboard, upload the video under Videos and wait until it is ready.
  2. Open the video. On its Overview tab, the Sharing card must say Public or Unlisted: a Private video has no embed code.
  3. In the same card, choose the Embed code tab and press Copy.
  4. In the WordPress editor, add a Custom HTML block and paste the code. Preview, then publish.

The player fills the width of the column at 16:9. If your Transcodely app limits Allowed embed domains, add your site’s host there, or the player will not load.

Anyone with the link can play an unlisted video. For lessons only some visitors may watch, use the plugin.

With the plugin (beta)

The plugin is beta: version 0.1.0 has not been used on a production site. Its own readme lists what has and has not been exercised; most notably, it has not yet been run against the live Transcodely API, and its LearnDash and MemberPress integrations are written from their documentation and have never been tested against the real plugins. It is not in the wordpress.org plugin directory. It needs WordPress 6.4 or later and PHP 7.4 or later.

Install

  1. Download transcodely-0.1.0.zip from the plugin’s GitHub releases page.
  2. In WordPress, go to Plugins > Add New > Upload Plugin, choose the zip, install and activate.
  3. In the Transcodely dashboard, create an API key under API keys for this site only, so it can be revoked on its own.
  4. In WordPress, go to Settings > Transcodely, paste the key, save, and press Test connection.
  5. For private videos, create a playback signing key on your app’s page in the Transcodely dashboard, under Playback signing keys, and paste its id (psk_…) and secret (pss_…) on the same settings page. The secret is shown once.

Updates are manual for now: upload a newer zip the same way.

Add a video

Add a Transcodely video block, or write the shortcode:

[transcodely id="vid_a1b2c3d4e5f6g7"]

The block and the shortcode take the same options and give the same output. access decides who sees the player:

accessWho sees the player
auto (default)Enrolled students on a lesson of a supported course plugin; everyone elsewhere.
everyoneEveryone. Logged-in viewers still get a token, for progress and private videos.
logged_inAny logged-in user.
capabilityLogged-in users with the WordPress capability in capability.
enrolledStudents the course plugin says are enrolled.
purchasedCustomers who bought one of the WooCommerce products.
memberActive MemberPress members of memberships. Untested against the real plugin.
[transcodely id="vid_a1b2c3d4e5f6g7" access="logged_in" complete_at="0.9"]

The API key and signing secret stay on your server. Visitors who are not allowed get a message and no player.

Lesson completion

When a student’s player reports the video completed, the plugin checks with Transcodely on the server that this student really played enough of it (complete_at, default 0.9), then marks the lesson complete:

  • Tutor LMS (tested with 4.2.3) and LifterLMS (tested with 11.1.1): integration tests against the real plugins.
  • LearnDash: untested against the real plugin.

What can go wrong

  • No Embed code tab in the dashboard: the video is not ready, or it is Private.
  • The player does not load: the app’s Allowed embed domains do not include your site.
  • A private video does not play: the signing key id or secret is missing on Settings > Transcodely.

Report plugin problems on its GitHub issues page.

Next steps

Run this against your own file

A free account runs standard-quality encodes up to 2 minutes, one at a time (a longer upload is shortened to its first 2 minutes), so the Quickstart runs with nothing set up but an API key.