Player Embed Script (Web)
The Player Embed Script integration method is the easiest way to embed the Player with the library on your site and provides access to the Platform API.
It is a single-line script that loads the Player exactly where it is added into the <body> of the page.
The embed script can be either copied from the Dailymotion Studio in the Player’s tab, or retrieved from the Platform API (see embed_script_url field).
ImportantThe Player Embed Script should always be loaded directly on every page. We don’t advise using any third-party solution to integrate it.
Embed a video
After adding the Player Embed Script, use the data-video attribute to specify which video ID to load. It should be added directly to the script tag that loads the pre-configured Player. To ease integration it's already added to the embed script that can be copied via the Dailymotion Studio and requires only a video ID to be defined.
<script src="https://geo.dailymotion.com/player/{Player ID}.js" data-video="x84sh87"></script>Embed a playlist
After adding the Player embed script, use the data-playlist attribute to specify which playlist ID to load. It should be added directly to the script tag that loads the pre-configured player.
<script src="https://geo.dailymotion.com/player/{Player ID}.js" data-playlist="x5zhzj"></script>
TipYou can play any specific video on top of a playlist, just specify both the video and playlist IDs in the embed script.
<script src="https://geo.dailymotion.com/player/{Player ID}.js" data-playlist="x79dlo" data-video="x7tgad0"></script>
Embed multiple Players
To use multiple Player configurations on a single page just add different embed scripts specifying their unique Player IDs.
<!-- Player 1 -->
<script src="https://geo.dailymotion.com/player/{Player ID}.js" data-video="x84sh87"></script>
<!-- Player 2 -->
<script src="https://geo.dailymotion.com/player/{Player ID}.js" data-video="x84sh87"></script>
Note:Only embed one player configuration with PiP activated as only one can be launched per page. In the case of instant PiP mode, the first player which will load on the page will launch in instant PiP.
Updated 25 days ago
