function toggleMiniPlayer(forceToggle, manualToggle = false) {
        playerInstance.debugMessage(`[MiniPlayer] Toggling MiniPlayer, forceToggle: ${forceToggle}`);

        const miniPlayerOptions = playerInstance.displayOptions.layoutControls.miniPlayer;

        if (!miniPlayerOptions.enabled) {
            playerInstance.debugMessage(`[MiniPlayer] Prevent toggle MiniPlayer, it's currently disabled`);
            return;
        }

        if ((forceToggle === 'on' && playerInstance.miniPlayerToggledOn) || (forceToggle === 'off' && !playerInstance.miniPlayerToggledOn)) {
            playerInstance.debugMessage(`[MiniPlayer] Can't force toggle Mini Player to it's same state`);
            return;
        }

        if (manualToggle) {
            toggleScreenDetection();
        }

        if (window.matchMedia(DESKTOP_ONLY_MEDIA_QUERY).matches) {
            isMobile = true;
        }

        // Important as the player can be in full screen or theater mode
        playerInstance.resetDisplayMode('miniPlayer');

        if (!isSetup) {
            // Setups JIT to avoid extra processing
            setupMiniPlayer();
        }

        if (forceToggle === 'off' || playerInstance.miniPlayerToggledOn) {
            toggleMiniPlayerOff();
        } else if (forceToggle === 'on' || !playerInstance.miniPlayerToggledOn) {
            toggleMiniPlayerOn(miniPlayerOptions.width, miniPlayerOptions.height, miniPlayerOptions.widthMobile, miniPlayerOptions.position);
        }
    }
Toggles the MiniPlayer given that it's enabled. Resets all other display modes.

@param {'on'|'off'} [forceToggle]
@param {boolean} manualToggle