function adaptNonLinearSize(width, height, mobileWidth) {
        /** @type HTMLImageElement|HTMLIFrameElement */
        const nonLinear = playerInstance.domRef.wrapper.querySelector(NON_LINEAR_SELECTOR);
        /** @type HTMLElement */
        const vpaidFrame = playerInstance.domRef.wrapper.querySelector(VPAID_FRAME_SELECTOR);

        if (!nonLinear) return;

        if (isMobile) {
            width = window.innerWidth * mobileWidth / 100; // Transforms vw to px
        }

        const nonLinearWidth = extractSizeFromElement(nonLinear, null, 'width');
        const nonLinearHeight = extractSizeFromElement(nonLinear, null, 'height');

        if (originalNonLinearWidth && originalNonLinearHeight) {
            nonLinear.width = originalNonLinearWidth;
            nonLinear.height = originalNonLinearHeight;

            if (vpaidFrame) {
                vpaidFrame.style.width = `${originalNonLinearWidth}px`;
                vpaidFrame.style.height = `${originalNonLinearHeight}px`;
            }

            originalNonLinearWidth = originalNonLinearHeight = null;
        } else if (nonLinearWidth > width || nonLinearHeight > height) {
            const targetRatio = (width - (isMobile ? 4 : 32)) / nonLinearWidth;

            originalNonLinearWidth = nonLinearWidth;
            originalNonLinearHeight = nonLinearHeight;

            nonLinear.width = Math.round(nonLinearWidth * targetRatio);
            nonLinear.height = Math.round(nonLinearHeight * targetRatio);

            if (vpaidFrame) {
                vpaidFrame.style.width = `${Math.round(nonLinearWidth * targetRatio)}px`;
                vpaidFrame.style.height = `${Math.round(nonLinearHeight * targetRatio)}px`;
            }
        }
    }
Adapts NonLinear size (if present) to fit MiniPlayer view

@param {number} [width]
@param {number} [height]
@param {number} [mobileWidth]