Supports for Dailymotion player with the Dailymotion player API.
The Dailymotion API is automatically loaded by the provider.
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).
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.
<div id="player" class="vlite-js" data-dailymotion-id="<video_id>"></div>
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'
});
See the Dailymotion provider demo.
See the Dailymotion player API documentation.