<!-- Please replace the player id with your own Player ID. Please check out our developer portal to learn more about our latest player embed: https://developer.dailymotion.com/player/#working-with-the-advertising-configuration -->
<script src="https://geo.dailymotion.com/libs/player/x34532.js"></script>

<h1> Player Embed Library </h1>

<div id="player1"></div>
const custom_params = '12345';
const new_params = '6789';

// Create a player using the API 
dailymotion
  .createPlayer('player1', {
    video: 'x3rdtfy',
    params: {
      customConfig: {
        customParams: custom_params
      }
    }
  })
  .then((player) => {
    player.on(dailymotion.events.VIDEO_PLAYING, () => {
      // dynamically update the advertising parameter value,
      // use the method to send a new value which then gets
      // updated when the player loads the next video file
      player.setCustomConfig({ customParams: new_params })
    })
  });

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.