Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.77 KB

README.md

File metadata and controls

50 lines (33 loc) · 1.77 KB

Provider: Dailymotion

Supports for Dailymotion player with the Dailymotion player API.

The Dailymotion API is automatically loaded by the provider.

Overview

Name dailymotion
Global name¹ window.VlitejsDailymotion
Path vlitejs/dist/providers/dailymotion
Entry point vlitejs/dist/providers/dailymotion.js
  • ¹ The global name is only useful if vLitejs is included with a <script> tag (see CDN section).

Usage

First, Dailymotion requires a Player Id to create player with the JavaScript API. It can be created from the Partner Space (see Getting started) and passed to the function registerProvider as the following example.

HTML

<div id="player" class="vlite-js" data-dailymotion-id="<video_id>"></div>

JavaScript

import 'vlitejs/dist/vlite.css';
import Vlitejs from 'vlitejs';
import VlitejsDailymotion from 'vlitejs/dist/providers/dailymotion';

Vlitejs.registerProvider('dailymotion', VlitejsDailymotion, {
  playerId: '<player_id>' // Required by Dailymotion
});

new Vlitejs('#player', {
  provider: 'dailymotion'
});

Demo

See the Dailymotion provider demo.

API documentation

See the Dailymotion player API documentation.