Documentation

Scale Information

In certain instances, particularly when the player is being styled using the css transform property, it may be necessary to provide it with scaling information. If this is not done, some addons may start behaving incorrectly when the player is scaled – an example issue would be displaying the dragged element in a different place than the cursor.

Updating scale information

The scaling information has to be updated whenever the player is resized (for example, when the value of the transform css applied to the player changes). In addition to that, if initial scaling differs from the default values, that information also has to be passed to the player. In order to do so, you need to use the setScaleInformation(scaleInformation) method, available in Player services. The scaleInformation object should contain the fields described in the ScaleInformation type. If no scaling is applied to the player after resizing, the scaleInformation object should contain the default values.

ScaleInformation type

Field Description
scaleX Scaling of the player on the X axis. It is equal to the actual displayed width of the player by its width without scaling. The default value is 1.0 .
scaleY Scaling of the player on the Y axis. It is equal to the actual displayed height of the player by its height without scaling. The default value is 1.0 .
transform Value of transform css style applied to the player. The default value is "".
transformOrigin Value of transform-origin css style applied to the player. The default value is "".