Create Player
Introduction
The Dailymotion Player is customizable, consistent across all devices, delivered with Picture-in-Picture, extensive analytics and the necessary advertising infrastructure out of the box.
Each Player is identified with a unique ID that carries every element you need to make embeds easy and efficient:
- Configuration with a set of parameters you defined via the API or your Dailymotion Studio.
- Analytics to monitor your embeds' performance.
- Tracking to ensure accurate monetization ad targeting and ad revenue attribution.
In this article, we'll guide you to create your own custom Player via the API so you can start your journey with Dailymotion in the best conditions.
AlternativeIf you prefer a user-friendly interface, you can create Players from the Dailymotion Studio rather than the API.
Implementation steps
1. Create your Player
To create a Player via the API, you need to have the manage_players scope. You can refer to the authentication guide to see how to authenticate with specific scopes.
Then, define and specify the required fields and perform a POST request. Once a Player has been created and associated with your account, it is possible to update or delete it. Refer to the list of Player fields for customization.
curl -X POST -H 'Authorization: Bearer ${ACCESS_TOKEN}' \
-d 'label=My new player' \
'https://partner.api.dailymotion.com/rest/user/<YOUR_PROFILE_ID>/players'2. Embed your Player
Players can be embedded on web and native environments.
Embed on web
Our Web SDK provides you with different integration methods to embed content on web with your custom Player. You only need to add your Player to your page using a generated script embed or iFrame.
The script URL of your Player can be retrieved with the Platform API using the below fields, depending on which embed method you want to use.
To know which embed methods best suits your needs, please refer to the description of each integration methods.
Embed type | API | Description |
|---|---|---|
Embed script URL | Retrieve the URL of the Player Embed Script. | |
Library script URL | Retrieve the URL of the Player Library Script. | |
Embed HTML URL | Retrieve the URL of the iFrame Player. |
Embed on native
You can embed your custom Player on native environments using our dedicated SDKs.
| Embed type | Description |
|---|---|
| Android SDK | Pass in your Player ID when creating a PlayerView in your Android app. Check the Android SDK guide to learn how to embed with our SDK. |
| iOS SDK | Pass in your Player ID when creating a PlayerView in your iOS app. Check the iOS SDK guide to learn how to embed with our SDK. |
Updated 3 days ago
