Table of content

Migration guide to new embed endpoint


Introduction

To help you take the necessary actions and migrate to the new embed endpoint, 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.

  • ⌛ Remaining migration: This element is still pending sunset and requires actions on your part to ensure a smooth transition.
  • ✓ Migrations completed: These elements have already been updated over the deprecation process. Migration should already be completed on your side.

✓ Migrations completed

✓ Migrate legacy native SDKs

Summary

Starting February 3rd 2025, any content embedded on native using our legacy Android and iOS SDK will no longer work as expected. This is caused by the fact that these legacy native SDKs rely on the legacy embed endpoint that we are deprecating.

How does it impact you?

If you keep using our legacy native SDKs after February 3rd 2025, we cannot guarantee that your content will work as expected on your app.

See the recommended actions to migrate to the new SDKs.

Timeline

From February 3rd 2025: Content embedded with the legacy Android and iOS SDKs will no longer work as expected.

It is required to migrate to our currently supported native SDKs before Feb 3rd 2025 to avoid any disruption. This will also allow you to benefit from using our new embed endpoint and be able to specify a Player ID:

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

✓ Migrate embed_html field

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 is now returning 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 16th 2024: REST API response for embed_html returns 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 field

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 is now returning 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 16th 2024: REST API response for embed_url returns 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 web embeds

Summary

Since October 15th 2024, any content embedded on the web using the legacy embed endpoint is automatically redirected 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 don’t 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 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

FAQ

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

All web 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.

For content embedded with legacy native SDKs:

From Feb 3rd 2025, the Player will no longer work as expected