Loop

Work with the loop parameter.

📘

You are reading API v2 documentation

Still using the Legacy API? Access the Legacy API documentation.


Your embedded content can be automatically played again by adding the loop runtime Player parameter of your embed method on either a video or a playlist object.

Depending on your Player configuration and your object, you will be able to either loop a list of recommendations, a playlist or a single video.


Player configuration for specific loop behaviors

Use the table below to set up your Player configuration for the intended loop behavior:

Expected loop behaviorEmbedded objectlooprecommendations.enable_automaticplayback.enable_autonext

Loop upon single video

Video loops smoothly without any interruption

Videotruefalsefalse

Loop upon recommendation list

Once your video is finished, the recommended videos will play. When the last video reaches the end, the playback will play again from the beginning of the queue.

Videotruetruetrue

Loop upon playlist

Once your video is finished, your playlist will play. When the last video reaches the end, the playlist will play again from the beginning.

Playlist or Video within a playlisttruetruetrue

Integration examples

Check the following examples to see how to add the loop parameter in your embed method.

Player Embed Script
<!-- Loop Video object -->
<script src="https://geo.dailymotion.com/player/{Player ID}.js" data-video="{Video ID}" data-params="loop=true">
</script>

<!-- Loop Playlist object -->
<script src="https://geo.dailymotion.com/player/{Player ID}.js" data-playlist="{Playlist ID}" data-params="loop=true">
</script>
<!-- Replace the Player ID and Video/Playlist ID with your own -->

<!-- Loop Video object -->
<script src="https://geo.dailymotion.com/player/x8lr5.js" data-video="x84sh87" data-params="loop=true">
</script>

<!-- Loop Playlist object -->
<script src="https://geo.dailymotion.com/player/x8lr5.js" data-playlist="x79dlo" data-params="loop=true">
</script>
Player Library Script
<body>
<script src="https://geo.dailymotion.com/libs/player/{Player ID}.js"></script>

<div id="my-dailymotion-player">My Player placeholder</div>

<script> dailymotion .createPlayer("my-dailymotion-player", {
<!-- Loop Video object -->
    video: "{Video ID}",
<!-- or, loop Playlist object -->
    playlist: "{Playlist ID}",
params: {
loop: true
}, }) .then((player) => console.log(player)) .catch((e) => console.error(e)); </script>
</body>
<!-- Replace the Player ID and Video/Playlist ID with your own.-->

<body>
<script src="https://geo.dailymotion.com/libs/player/x8lr5.js"></script>

<div id="my-dailymotion-player">My Player placeholder</div>

<script> dailymotion .createPlayer("my-dailymotion-player", {
<!-- Loop Video object -->
    video: "x84sh87",
<!-- or, loop Playlist object -->
    playlist: "x79dlo",
params: {
loop: true
}, }) .then((player) => console.log(player)) .catch((e) => console.error(e)); </script>
</body>
Player iFrame
<!-- Loop Video object -->
<iframe frameborder="0"width="640"height="360"
src="https://geo.dailymotion.com/player/{Player ID}.html?video={Video ID}&loop=true"
allowfullscreen allow="autoplay; fullscreen; picture-in-picture; web-share">
</iframe>

<!-- Loop Playlist object -->
<iframe frameborder="0"width="640"height="360"
src="https://geo.dailymotion.com/player/{Player ID}.html?playlist={Playlist ID}&loop=true"
allowfullscreen allow="autoplay; fullscreen; picture-in-picture; web-share">
</iframe>
<!-- Replace the Player ID and Video/Playlist ID with your own -->

<!-- Loop Video object -->
<iframe frameborder="0"width="640"height="360"
src="https://geo.dailymotion.com/player/x8lr5.html?video=x84sh87&loop=true"
allowfullscreen allow="autoplay; fullscreen; picture-in-picture; web-share">
</iframe>

<!-- Loop Playlist object -->
<iframe frameborder="0"width="640"height="360"
src="https://geo.dailymotion.com/player/x8lr5.html?playlist=x79dlo&loop=true"
allowfullscreen allow="autoplay; fullscreen; picture-in-picture; web-share">
</iframe>

Did this page help you?