Dailymotion Previews are another implementation with Dynamic Previews. Previews let you surface top stories from your newsroom(s) and surface them across your site. By default, the previews redirect to your Dailymotion video page to improve monetization options.
You need to do 2 things to embed the Previews.
body
end in your website
<script src="https://srvr.dmvs-apac.com/dm-preview/dm-preview.min.js"></script>
<div class="dm-preview"
{PARAMS}></div>
in your target of body content.<div class="dm-preview" playlistId="{PLAYLIST_ID}"></div>
Name | Type | Description |
---|---|---|
playlistId Mandatory |
string | Set playlist xid directly to the tag to embed playlist |
numOfVideos | number | To specify the number of videos in the playlist. Default value : 5 |
syndication | string | Syndication key. Needed if the video content does not belong to your channel/network of channels AND/OR if you embed the Dailymotion Previews into specific 3rd party environments (Google AMP, Facebook IA, OTT products, in-app, operated but not owned web domains…). This enables tracking and targeting. |
type | string | Can be set as vertical / horizontal type of the preview. By default its horizontal i.e., 16:9 aspect-ratio |
<script type="application/json" id="dm_preview_text" >
tag before embed code for Previews.<script type="application/json">
as JSON
format.<script type="application/json" id="dm_preview_text">
{
"title_card": [
{
"video_id": "x847mil",
"text": "Custom title for rahul gandhi"
},
{
"video_id": "x82qaiq",
"link": "https://www.example.com/customlink"
}
]
}
</script>
As you see above data, the title/CTA link of the video can be replaced from the default value where
video_id
is themandatory
field.
.dm-preview{
/* To change background color of progress bar */
--dm-preview-progress-bg: rgba(88, 89, 104,.5);
/* To change color of progress bar */
--dm-preview-progress-color: rgba(255,255,255,.5);
}
Example: