JavaScript video player for any website

Embed the Kinescope player with a script tag or npm, then shape it from your code: brand color, controls, watermark, chapters, autoplay, or buttons of your own. Hosting, adaptive streaming and DRM come with it.

Build your player and copy the code

A real Kinescope player. Every setting rebuilds it with the same options you see in the code, so what you copy is what you just watched.

Controls

Look

Player color
Player language

Content

Behavior

Loads as you scroll here
import { load } from '@kinescope/player-iframe-api-loader';

const factory = await load();
const player = await factory.create('player', {
  url: 'https://kinescope.io/56Jg27MqvvttAwHcrCzEA4',
  size: { width: '100%', height: '100%' },
});

Three ways to add the player

From a plain iframe to full control in code. Pick the one that fits your page.

  1. Just the player: an iframe

    No JavaScript at all. Paste the iframe; the embed code generator adds autoplay, start time and quality to the link.

    index.html
    <iframe
      src="https://kinescope.io/embed/VIDEO_ID"
      allow="autoplay; fullscreen; picture-in-picture; encrypted-media"
      style="border: none; width: 100%; aspect-ratio: 16 / 9;"
    ></iframe>
  2. An iframe you can control

    Already have iframes on the page? Add ?enableIframeApi to their links and ?auto to the API script, and every player connects to the API.

    index.html
    <script defer src="https://player.kinescope.io/latest/iframe.player.js?auto"></script>
    <script>
      function onKinescopeIframeAPIReady(factory) {
        factory.on(factory.Events.Created, ({ data: player }) => {
          player.setVolume(0.5);
        });
      }
    </script>
    
    <iframe src="https://kinescope.io/embed/VIDEO_ID?enableIframeApi"
      allow="autoplay; fullscreen; picture-in-picture; encrypted-media"></iframe>
  3. Full control: create the player in code

    Install the loader for async/await and TypeScript types, then pass every option to create(). This is the code the studio above writes for you.

    player.js
    import { load } from '@kinescope/player-iframe-api-loader';
    
    const factory = await load();
    const player = await factory.create('player', {
      url: 'https://kinescope.io/VIDEO_ID',
      ui: { watermark: { text: 'student@example.com' } },
      theme: { colors: { primary: '#6b61fc' } },
    });
    
    player.on(player.Events.Ended, () => showNextLesson());

A bare

Task
Bare <video> tag
Kinescope player
Adaptive quality
A transcoding pipeline, plus hls.js or dash.js in the page.
Every upload is encoded into renditions up to 4K and switched automatically.
Delivery
Your own server or a CDN you set up and pay for separately.
Kinescope’s own CDN.
DRM
Encrypted Media Extensions and a license server.
Widevine and FairPlay on the Super plan; your backend can approve each play.
Watermark
An overlay you build and position yourself.
ui.watermark: text in random spots or stripes.
Chapters, subtitles, playlists
Your own UI for each one.
chapters, vtt and a playlist with next() and switchTo().
Controls
The browser’s controls or a set you write.
Built-in and themeable, or ui.controls: false for your own.
Analytics
Your own event tracking.
Views, watch depth and drop-off; externalId ties them to your users.

What developers build with it

Save lesson progress

Listen to TimeUpdate for the position and Ended for the finish, then store both in your backend. seekTo() brings the student back.

Sell from the video

Add a call to action that opens at a second or a percentage of the video, and count clicks with the CallAction event.

Put the viewer’s email on the frame

Pass the logged-in user’s email to ui.watermark. A screen recording then shows whose account it came from.

Match your brand

theme.colors.primary sets the player color; hide the big play button, the speed or fullscreen button through ui.

Build a course playlist

Pass several items with titles and chapters; behavior.playlist.autoSwitch moves to the next lesson by itself.

Autoplay below the fold

autoPlay: 'viewable' starts the video when the visitor scrolls to it; if sound is blocked, the player retries muted.

FAQ

Can’t find the answer you need? Check out our Player docs.

It depends on what you already have. Video.js and Plyr are open-source players: you still need encoding, adaptive streaming, a CDN and, for paid content, DRM. Kinescope gives you the player together with hosting, encoding, delivery and protection, and you control it from JavaScript with the IFrame Player API.

Add a <div id="player">, load iframe.player.js or install @kinescope/player-iframe-api-loader, and call factory.create('player', { url }) with your video link. The studio on this page writes that code with your settings.

Yes. Create the player with ui: { controls: false } and call play(), pause(), seekTo(), setPlaybackRate() or setVideoQuality() from your buttons. Events such as TimeUpdate keep your progress bar in sync. Switch the studio to “Your own buttons” to try it.

Yes. Set theme: { colors: { primary: '#hex' } } when you create the player. The progress bar and the play button take that color.