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
publicandunlistedvideos, 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
- In the Transcodely dashboard, upload the video under Videos and wait until it is
ready. - Open the video. On its Overview tab, the Sharing card must say Public or Unlisted: a Private video has no embed code.
- In the same card, choose the Embed code tab and press Copy.
- 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
- Download
transcodely-0.1.0.zipfrom the plugin’s GitHub releases page. - In WordPress, go to Plugins > Add New > Upload Plugin, choose the zip, install and activate.
- In the Transcodely dashboard, create an API key under API keys for this site only, so it can be revoked on its own.
- In WordPress, go to Settings > Transcodely, paste the key, save, and press Test connection.
- 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:
access | Who sees the player |
|---|---|
auto (default) | Enrolled students on a lesson of a supported course plugin; everyone elsewhere. |
everyone | Everyone. Logged-in viewers still get a token, for progress and private videos. |
logged_in | Any logged-in user. |
capability | Logged-in users with the WordPress capability in capability. |
enrolled | Students the course plugin says are enrolled. |
purchased | Customers who bought one of the WooCommerce products. |
member | Active 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
- Embed a video anywhere: the embed code and player events in detail.
- Course Progress: how completion is counted.
- Protected Playback: what a playback token protects against.