Interface PinningConfiguration

interface PinningConfiguration {
    allowOnMobile: boolean;
    closeable: boolean;
    height: null | number;
    manualContainerSize: boolean;
    posX: "right" | "left";
    posY: "top" | "bottom";
    scale: number;
    viewable: number;
    width: null | number;
}

Properties

allowOnMobile: boolean

By default, pinning mode will not work on Android or iOS mobile devices. Defaults to false.

closeable: boolean

By default, pinning mode will include a close button, which the user can click to disable pinning mode. Defaults to true.

height: null | number

By default, the plugin will scale down the player's dimensions by a factor determined by the scale option. However, providing a height (or width) will override the default scaling and set the size of the scaled-down player explicitly. If only one dimension is provided, the other will be scaled down to maintain the aspect ratio. If both dimensions are provided, the player will be set to the exact, specified size. Defaults to null.

manualContainerSize: boolean

By default, a player with this plugin enabled will keep the physical dimensions of the special container element in sync with the player's dimensions. However, this doesn't work for all cases, so it can be disabled by setting this option to false. When doing so, the container element will behave like a normal block element. This means that users of the plugin will need to manage its size on their own. Defaults to false.

posX: "right" | "left"

The horizontal alignment of the player when it is in pinning mode. Defaults to 'right'.

posY: "top" | "bottom"

The vertical alignment of the player when it is in pinning mode. Defaults to 'bottom'.

scale: number

The scaling factor applied to the player when it is in pinning mode. Must be a number greater than zero and less than or equal to 1. Defaults to 2/3.

viewable: number

The threshold at which the player is considered viewable. In other words, when this percentage of the player is visible in the browser's viewport, it is considered viewable. For example, with the default of 0.8, the player is not considered viewable unless 80% of it is visible in the viewport. Must be a number greater than or equal to 0 or less than or equal to 1. Defaults to 0.8.

width: null | number

By default, the plugin will scale down the player's dimensions by a factor determined by the scale option. However, providing a width (or height) will override the default scaling and set the size of the scaled-down player explicitly. Defaults to null.