How to cause the player to exit full screen mode automatically after playback?

You will need to use JavaScript to exit full screen mode when playback has ended, for V2 players.

1. Edit the page where the player is located, and add the following JavaScript code:

<script>
function jsCallbackReady(objectId) {
window.kdp = document.getElementById(objectId);
kdp.addJsListener("playbackComplete""playerPlayEndHandle");
}
 
function playerPlayEndHandle () {
kdp.sendNotification('closeFullScreen');
}
</script>  

2. Save the HTML page and validate that the solution is working.

In This Article