VidCine Player

Documentation

Put a classic film or TV episode on your page with one iframe and a TMDB id. There's no key to request and nothing to install.


Quick Start

Two steps, and the player is on your page.

1Add the player

<iframe
  src="https://player.vidcine.net/embed/movie/106646"
  width="100%"
  height="100%"
  frameborder="0"
  allow="autoplay; fullscreen; picture-in-picture"
  allowfullscreen
></iframe>

2Keep it 16:9 at any width

<div style="position:relative;aspect-ratio:16/9">
  <iframe
    src="https://player.vidcine.net/embed/movie/106646"
    style="position:absolute;inset:0;width:100%;height:100%;border:0"
    allow="autoplay; fullscreen; picture-in-picture"
    allowfullscreen
  ></iframe>
</div>

Keep allow and allowfullscreen, and leave out sandbox. The player needs its scripts and full screen.

The Address

There's one pattern for films and one for TV episodes.

https://player.vidcine.net/embed/movie/{id}?option=value
https://player.vidcine.net/embed/tv/{id}/{season}/{episode}?option=value
PartWhat it is
{id}The film's or show's TMDB id. See TMDB IDs.
{season}, {episode}The season and episode numbers, as TMDB lists them.
option=valueAnything you want to change. Join several with &. See Customizing.

An episode

<iframe
  src="https://player.vidcine.net/embed/tv/6560/1/1"
  width="100%"
  height="100%"
  frameborder="0"
  allow="autoplay; fullscreen; picture-in-picture"
  allowfullscreen
></iframe>

An id or episode that isn't in the catalog shows a short message in the player.

Customizing

Everything is set in the address. The demo writes it for you.

Accent colour

Set the seek bar, sliders and switches with color: six hex digits, no #.

<iframe
  src="https://player.vidcine.net/embed/movie/106646?color=2fe6d0"
></iframe>

Start time

Open at a set second with t.

<iframe
  src="https://player.vidcine.net/embed/movie/106646?t=90"
></iframe>

Autoplay

Start on load with autoplay. If the browser refuses sound, the player starts muted and tells the viewer how to turn it on. Add muted to always start silent.

<iframe
  src="https://player.vidcine.net/embed/movie/106646?autoplay=true&muted=true"
></iframe>

Server and quality

Many titles have a second copy and more than one file. Choose where playback starts with server and quality. If the title doesn't have it, the player uses its default.

<iframe
  src="https://player.vidcine.net/embed/movie/106646?server=matinee&quality=240"
></iframe>

Buttons and menu rows

Remove buttons with settings, pip and fullscreen, and rows of the settings menu with hide.

<iframe
  src="https://player.vidcine.net/embed/movie/106646?pip=false&hide=speed,more"
></iframe>

All options

OptionValuesDefaultWhat it does
autoplaytruefalseStarts on load. If the browser refuses sound, it starts muted and tells the viewer how to turn it on.
mutedtruefalseStarts with the sound off.
tseconds0Starts at this second.
speed0.25 to 21Starting speed. The viewer can still change it.
quality240, 360, 480, 720, 1080the best fileStarts on this file, if the film has it.
servermarquee, matineemarqueeStarts on this copy, if the film has it.
colorhex, no #ffffffSeek bar, sliders, switches and selected chips.
posterfalsetrueLeaves out the frame shown before play.
titlefalsetrueHides the film title in the phone layout.
settingsfalsetrueRemoves the settings button.
pipfalsetrueRemoves the picture-in-picture button.
fullscreenfalsetrueRemoves the fullscreen button.
hidespeed, quality, server, morenoneTakes those rows out of the player's menu. Separate several with commas.

All at once

<iframe
  src="https://player.vidcine.net/embed/movie/106646?color=2fe6d0&t=90&speed=1.25&autoplay=true&muted=true&pip=false&hide=more"
></iframe>

Keys and Touch

The player answers these once it has focus.

KeyWhat it does
Space KPlay or pause. Hold Space for 2×.
← → J LBack or forward 10 seconds.
↑ ↓Volume.
M FMute, full screen.
0–9Jump through the film, 0 to 90%.
< >Slower or faster.

On a phone, double-tap either side to skip 10 seconds and tap once for the controls. Settings open as a sheet you can drag away.

Player Messages

The player tells your page what it's doing through postMessage. Check where a message came from before you trust it.

window.addEventListener('message', (e) => {
  if (e.origin !== 'https://player.vidcine.net') return;
  if (e.data?.type !== 'PLAYER_EVENT') return;

  const { event, film, season, episode, currentTime, duration } = e.data.data;
  console.log(event, film, season, episode, currentTime, duration);
});

film is the TMDB id. season and episode come with TV episodes.

EventWhen
play, pausePlayback started or stopped.
seekedA jump finished.
timeupdateEvery 5 seconds while the time moves. Enough for a Continue Watching row.
endedThe film or episode finished. A good moment to offer the next one.

Send commands

Your page can also control the player.

const player = document.querySelector('iframe').contentWindow;

player.postMessage({ type: 'SET_TIME', time: 90 }, 'https://player.vidcine.net');
player.postMessage({ type: 'PAUSE' }, 'https://player.vidcine.net');
player.postMessage({ type: 'PLAY' }, 'https://player.vidcine.net');

A browser can refuse PLAY until the viewer has pressed something. You can try these in the demo.

The Catalog

The whole catalog is open JSON, from any site, with no key.

RequestReturns
GET /api/filmsEvery film.
GET /api/films?genre=noirOne genre: silent, horror, noir, comedy, scifi, drama.
GET /api/films?q=keatonTitles, directors and cast that match.
GET /api/films/106646One film by its id.
GET /api/showsEvery show. Also takes ?q= and ?genre=: crime, western.
GET /api/shows/6560One show with its seasons and episodes.
Loading…

TMDB IDs

Ids come from TMDB. It's the number in a title's address on themoviedb.org. The demo takes a pasted link too.

themoviedb.org/movie/106646themoviedb.org/tv/6560

TV shows in the catalog

ShowYearIdEpisodesActions
Sherlock Holmes19546560S1: 1–39Test
Bonanza19591018S1: 19–32
S2: 1–17
Test
Annie Oakley195413577S1: 1–6, 8–9, 11–16, 18–19, 21, 23, 25
S2: 2, 4–7, 11, 20
S3: 1–4, 6, 8, 12, 14–20, 22–23, 25–28, 30, 33–35
Test

Films in the catalog

FilmYearIdActions
Nosferatu1922653Test
Night of the Living Dead196810331Test
The General1926961Test
Detour194520367Test
His Girl Friday19403085Test
The Last Man on Earth196421159Test
Carnival of Souls196216093Test
Sherlock Jr.1924992Test
The Cabinet of Dr. Caligari1920234Test
The Phantom of the Opera1925964Test
Plan 9 from Outer Space195710513Test
Scarlet Street194517058Test
The Little Shop of Horrors196024452Test
Battleship Potemkin1925643Test
The Stranger194620246Test
House on Haunted Hill195915856Test
The Hitch-Hiker195341462Test
My Man Godfrey193613562Test
A Trip to the Moon1902775Test

Every title here is in the public domain in the United States, and each one's JSON says why. Rules differ in other countries, so check yours if your audience is elsewhere.

Ready to try it?

Enter an id, set your options, and copy the code.

Open the demo