Docs › Embedding with an iframe (no code)
Embedding with an iframe (no code)
To put a video on a site without writing any code, turn on embedding for it, then paste the code where it should appear. In the app, open the video's menu and choose Embed…. With the API:
PUT /videos/3f1c…/embed
{ "enabled": true }
→ { "videoId": "3f1c…", "enabled": true, "url": "https://videopiper.com/embed/3f1c…?t=Xy9…",
"iframe": "<iframe src=\"https://videopiper.com/embed/3f1c…?t=Xy9…\" …></iframe>" }
- Off until you turn it on, per video. The embed URL carries a random token; without embedding on, it shows "This video isn't available".
- Options go on the embed URL:
autoplay=1(muted),loop=1,cc=1(captions on),start=seconds. - Where it can appear: with allowed domains set, browsers only show the player inside your sites (we send them as the page's
frame-ancestors). Without them, any site with the code can show it. - Revoke a code by turning embedding off (
{"enabled": false}); turning it on again makes a new code. The page is cached for up to 5 minutes, so a change takes that long to reach every viewer. - The status shows
embed(enabled,url,iframe) and the list shows"embeddable": truefor videos with embedding on. Plays count as delivery, like any other playback. - On the Free plan the player shows a small "Video Piper" badge.
Allowed domains
Signed in to your account, add your sites under Allowed domains (or PUT /account/allowed-domains with {"domains": ["example.com", "*.example.com"]}). Playback and streaming links then only play on those sites, so nobody can embed your videos elsewhere. *.example.com covers subdomains; add example.com too for the bare domain. Changes apply to links made afterwards. Requests without an Origin or Referer (some native apps) are refused, so leave the list empty if you play videos in an app. It stops hotlinking; it isn't DRM.