Table of content

Migration guide to new embed endpoint


Introduction

Starting September 23rd 2024, we are progressively deprecating our legacy embed endpoint, replacing it with our new embed endpoint:

Legacy embed endpointwww.dailymotion.com/embed/video/VIDEO_ID
New embed endpointhttps://geo.dailymotion.com/player/PLAYER_ID.html?video=VIDEO_ID

Since this deprecation can have a significant impact on integrations, we are proceeding with a progressive deprecation to allow Partners to complete the migration without disruption.

Why are we deprecating the legacy embed endpoint?

So that you can upgrade your integration and enjoy the benefits that comes with the new embed endpoint:

  • Use your custom Player configuration and manage settings from your Studio
  • Improved viewability measurement
  • Optimized monetization with custom parameters and more accurate ad targeting

Timeline

Deprecation dateSeptember 23rd 2024:
Start of the progressive deprecation plan.
See below an overview of the detailed timeline.
Sunset dateFrom February 3rd 2025:
Legacy embed endpoint will be cleaned up from our codebase and will cease to work

To help you take the necessary actions, this guide details the different elements that are impacted. Please refer to the sections that are relevant to your integration and take the necessary steps to migrate accordingly.


Migrate embed_html

Summary

The API field embed_html can be used to retrieve the iframe embed code of a video.

With the deprecation of the legacy embed endpoint, the REST API response for embed_html will now return the new embed endpoint:

REST API response before migration:

{
"embed_html": "<iframe frameborder=\"0\" width=\"640\" height=\"360\" src=\"https://www.dailymotion.com/embed/video/x84sh87\" allowfullscreen allow=\"autoplay; web-share\"></iframe>",
}

REST API response after migration:

{ 
"embed_html": "<iframe src=\"https://geo.dailymotion.com/player.html?video=x84sh87\" allow=\"autoplay; fullscreen; picture-in-picture; web-share\" allowfullscreen frameborder=\"0\" width=\"640\" height=\"360\"></iframe>",
}

Timeline

From September 23rd 2024: REST API response for embed_html will return new embed endpoint.

Update your CMS – If you are using a CMS, make sure that the new embed links returned by the API are compatible with your system.

Specify a Player ID To use a custom Player configuration and optimize monetization, it is recommended to specify a Player ID in the embed code. You can do so by adding the parameter context=player%3D<PLAYER_ID> in the query.

Query example:

GET https://api.dailymotion.com/video/x84qh53?fields=embed_html&context=player%3Dxc394

Will return:

{
"embed_html": "<iframe src=\"https://geo.dailymotion.com/player/xc394.html?video=x84qh53\" allow=\"autoplay; fullscreen; picture-in-picture; web-share\" allowfullscreen frameborder=\"0\" width=\"640\" height=\"360\"></iframe>"
}
Why is it important to specify a Player ID:
  • Benefit from your custom Player configuration
  • Get accurate viewability performance
  • Optimize monetization with custom parameters
If you do not specify a Player ID:
  • Your videos will be embedded with a default Player configuration
  • Query parameters will not work anymore except for ads_params, mute, startTime and loop

Learn more about embed_html.


Migrate embed_url

Summary

The API field embed_url can be used to retrieve the embed code of a video.

With the deprecation of the legacy embed endpoint, the REST API response for embed_url will now return the new embed endpoint:

REST API response before migration:

{
 "embed_url":"https://www.dailymotion.com/embed/video/x84sh87"
}

REST API response after migration:

{  
"embed_url":"https://geo.dailymotion.com/player.html?video=x84sh87"
}

Timeline

From September 23rd 2024: REST API response for embed_url will return new embed endpoint.

Update your CMS – If you are using a CMS, make sure that the new embed links returned by the API are compatible with your system.

Specify a Player ID To use a custom Player configuration and optimize monetization, it is recommended to specify a Player ID in the embed code. You can do so by adding the parameter context=player%3D<PLAYER_ID> in the query.

Query example:

GET https://api.dailymotion.com/video/x84qh53?fields=embed_url&context=player%3Dxc394

Will return:

{
"embed_url": "https://geo.dailymotion.com/player/xc394.html?video=x84qh53"
}
Why is it important to specify a Player ID:
  • Benefit from your custom Player configuration
  • Get accurate viewability performance
  • Optimize monetization with custom parameters
If you do not specify a Player ID:
  • Your videos will be embedded with a default Player configuration
  • Query parameters will not work anymore except for ads_params,   mute, startTime and loop

Learn more about embed_url.


Migrate video and playlist embedded on web

Summary

Starting October 15th 2024, any video or playlist embedded on web using the legacy embed endpoint will automatically redirect to the new embed endpoint.

How does it impact you?

The automatic redirection to the new embed endpoint comes with a default Player configuration. Query parameters will not work anymore, except for ads_params, mute, startTime and loop. See the recommended actions to keep using a custom Player configuration.

The following legacy embed scripts:

# For video embeds:
<iframe src="https://www.dailymotion.com/embed/video/x84sh87"></iframe>

# For playlist embeds:
<iframe src="https://www.dailymotion.com/embed/playlist/x85ce2"></iframe>

Will automatically redirect to:

# For video embeds:
<iframe src="https://geo.dailymotion.com/player.html?video=x84sh87"></iframe>

# For playlist embeds:
<iframe src="https://geo.dailymotion.com/player.html?playlist=x85ce2"></iframe>

Timeline

From October 15th 2024: All embeds using the legacy endpoint will automatically redirect to the new endpoint and use a default Player.

If you want to keep embedding with a custom Player configuration on your website past this date, you’ll need to specify your Player ID in your embed code. You can either continue embedding using iframes and update your embed code (scenario 1) or switch to more advanced embed options (scenario 2).

Why is it important to specify a Player ID:
  • Benefit from your custom Player configuration
  • Get accurate viewability performance
  • Optimize monetization with custom parameters

Scenario 1: Migrate with iFrames

Update your embed URL – Replace the legacy embed endpoint in your iframe with the new embed endpoint.

Specify your Player ID – Create a unique Player configuration in your Dailymotion Studio and add the Player ID after /player/ in your iframe script.

Your iframe script should look like this:

# For video embeds:
<iframe src="https://geo.dailymotion.com/player/xc394.html?video=x84sh87"></iframe>

# For playlist embeds:
<iframe src="https://geo.dailymotion.com/player/xc394.html?playlist=x85ce2"></iframe>

Learn more about iframe embeds.

Scenario 2: Migrate to advanced embed methods

Switch to advanced integration methods – To benefit from enhanced customization options such as programmatic control over the Player and event handling. Two advanced integration methods are available depending on your technical preferences: Player Embed Script and Player Library Script

Specify your Player ID – Add your Player ID after /player/ in the script.

The new embed endpoint with a Player ID will look like this:

Player Embed Script
Player Library Script
# For video embeds:
<script src="https://geo.dailymotion.com/player/xc394.js" data-video="x84sh87"></script>
 
# For playlist embeds:
<script src="https://geo.dailymotion.com/player/xc394.js" data-playlist="x85ce2"></script>
# For video embeds:
See code example here: https://codepen.io/team/dailymotion-developer/pen/vYJydOP

# For playlist embeds:
See code example here: https://codepen.io/team/dailymotion-developer/pen/bGrBxmX

Migrate video and playlist embedded on native

Summary

Starting February 3rd 2025, videos or playlists embedded with our legacy native SDKs (Android, iOS) will be sunset and will no longer load the Player, as they rely on the deprecated embed endpoint.

Timeline

From February 3rd 2025: Our legacy Android and iOS SDKs – which were still relying on the legacy embed endpoint – will be sunset.

It is required to migrate to our currently supported native SDKs in order to use our new embed endpoint and be able to specify a Player ID:


FAQ

What happens if I don’t complete the migration by February 3rd 2025?

All embeds using our legacy embed endpoint will be automatically redirected to the new endpoint past February 3rd 2025, but will use a default Player configuration.

As a result, any Player customization previously applied via query parameters will no longer work (except for ads_params, mute, startTime and loop). This may negatively impact your monetization performance as well as the overall user experience on your website.

To mitigate these potential issues, we recommend following the suggested actions outlined in this article, based on the specific elements that are impacted in your integration.