Skip to main content

Introduction

Motto’s embeddable player lets you put any video, event, or creative work directly on your own website using a standard HTML <iframe> tag — no SDK or JavaScript required on your side. The embed is served from Motto’s infrastructure, so you do not need to host anything yourself. Your viewers can watch content in the iframe exactly as they would on a native Motto OTT platform, including ads and adaptive streaming.
The embed player supports public content only.

Get Started

The easiest way to get the embed code is directly from Motto Studio:
  1. Find the video or event you want to embed.
  2. Open its options menu by clicking the three-dot icon on the item’s row.
Options menu with Embed video option
  1. Click Embed video.
  2. In the embed modal, click Copy to copy the ready-made HTML snippet.
Embed player modal with Copy button
  1. Paste the copied snippet into your website’s HTML.
That’s it — the snippet already includes your content ID and public key. The sections below explain the available URL parameters and advanced options if you need to customize the embed further. There are three embed types, each mapping to a content type in Motto: The copied snippet follows this structure. You can also build it manually by replacing the placeholder values with your content ID and public key:
The iframe fills its container width and maintains a 16:9 aspect ratio. To control the size, wrap it in a <div> with your desired width.

Query parameters

All embed types

Event and creative-work embeds

Example with autoplay

Listening to player events

The embed player can notify your page about playback events using the browser’s postMessage API. This is optional — the player works without it. To listen for events, add a message event listener on your page:

Available event types

All events carry { source: 'motto-embed', type: string, payload?: object }.

Content Protection

By default, every website is allowed to embed your videos using the approach described here. However, this means it is trivial for malicious actors to distribute your content by embedding it in their own website rather than yours. To prevent this, you can use our Domain Pinning feature. By doing so, only the domains that you configure will be allowed to embed your content. At a technical level, this is done via a Content-Security-Policy: frame-ancestors <domains> header in the iframe page, which tells the user’s browser whether to allow loading the iframe.
If your website sets a Content-Security-Policy: frame-src header, add frame-src https://embed.mottostreaming.com to allow the iframe to load.

Next Steps

  • Enable video ads and pass ads=1 in your embed URL to monetize your embedded content.