Skip to content

Latest commit

History

History
47 lines (31 loc) 路 1.51 KB

README.md

File metadata and controls

47 lines (31 loc) 路 1.51 KB

Provider: Dailymotion

Supports for Dailymotion player with the Dailymotion player API.

Note The Dailymotion API is automatically loaded by the provider.

Overview

Name dailymotion
Path vlitejs/providers/dailymotion
Entry point vlitejs/providers/dailymotion.js

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" data-dailymotion-id="<video_id>"></div>

JavaScript

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

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.