Skip to main content
Full Screen
Updated this week

Overview

This API enables developers to programmatically control the Full Screen function of the Anyclip player directly from their code. It supports both standard players and the Vertical Player with specific methods.

Methods for Standard Player

Open Full Screen

To programmatically open the player in full screen, use the following method:

anyclip.widgets[0].player.requestFullscreen()

Close Full Screen

To exit full screen mode, use this method:

anyclip.widgets[0].player.exitFullscreen();

Methods for Vertical Player

For the Vertical Player, use the following methods to simulate a pseudo-full screen mode:

Open Pseudo Full Screen

To programmatically enable pseudo-full screen mode for the Vertical Player:

anyclip.widgets[0].setPseudoFS(true);

Close Pseudo Full Screen

To exit pseudo-full screen mode for the Vertical Player:

anyclip.widgets[0].setPseudoFS(false);

Notes

  1. Player Type: Ensure you're using the appropriate methods based on whether you're interacting with the standard player or the Vertical Player.

  2. Indexing: The [0] in anyclip.widgets[0] corresponds to the first player widget initialized on the page. Adjust the index to target a specific player among multiple widgets.

  3. Browser Behavior: Full screen functionality for the standard player might be affected by browser security policies or user permissions. Ensure user interaction precedes the API call (e.g., button click).

Did this answer your question?