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.

Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted.

In This Article
Related Articles
Back to top

Never miss a thing!

Subscribe to our customer newsletter and our release notes updates, so you always get the best out of Kaltura.
Newsletter