Add runtime Player parameters (Web)

In addition to Player configuration settings, you can add extra parameters that can change at runtime.

While the main Player experience is controlled using the settings defined in your Player configuration from the Dailymotion Studio (Players tab) or the Platform API, additional runtime customization is achievable using client-side parameters. They allow you to specify additional Player behavior or pass in required values to a specific Player embed.

See below how to add runtime Player parameters for each embed method available.

For each example, we’re adding the following runtime parameters to the existing Player config defined in the {Player ID} placeholder:

  • startTime=15: video will start playing from second 15
  • mute=true: video will start muted

Find all available runtime parameters in the Web SDK Reference.

Player Embed Script

Add the URL encoded query string to the data-params attribute.

// Replace {Player ID} with your own Player ID, and x84sh87 with your own video ID
<script src="https://geo.dailymotion.com/player/{Player ID}.js" data-video="x84sh87" data-params="startTime=15&mute=true"></script>
Player Library Script

Add the URL encoded query string to the params object within the createPlayer() method.

// Replace x84sh87 with your own video ID
dailymotion
.createPlayer("my-dailymotion-player", {
  video: "x84sh87",
  params: {
    startTime: 15,
    mute: true,
  },
})
.then((player) => console.log(player))
.catch((e) => console.error(e));
iFrame

Add the URL encoded query string after the video ID in the src attribute of the iFrame.

// Replace {Player ID} with your own Player ID, and x84sh87 with your own video ID
<iframe frameborder="0" width="640" height="360" 
  src="https://geo.dailymotion.com/player/{Player ID}.html?video=x84sh87&startTime=15&mute=true" 
  allowfullscreen 
  allow="autoplay; fullscreen; picture-in-picture; web-share">
</iframe>