<!-- Please replace the player id with your own Player ID accessed via the Dailymotion Studio or REST API. -->
<script src="https://geo.dailymotion.com/player.js" data-video="x730nnd"></script>
// Get access to the embedded player instance using one of the get player methods. More info the methods see here https://developer.dailymotion.com/player/
const callback = (state) => {
console.log("Received PLAYER_START event. Current state is:", state);
}
dailymotion
.getPlayer()
.then((player) => {
// Add an event listener to the event 'PLAYER_START'
player.on(dailymotion.events.PLAYER_START, callback)
}).catch((e) => console.error(e));
// dailymotion
// .getPlayer()
// .then((player) => {
// Remove an event listener to the event 'PLAYER_START'
// player.off(dailymotion.events.PLAYER_START, callback})
// }).catch((e) => console.error(e));
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.