resize(width, height)

Resizes the player to the specified width and height.

AttributeDescriptionTypeRequired
widthThe new desired width of the player in pixels (number) or percent (string)Number | StringYes
heightThe new desired height of the player. Must be specified in pixels (number)NumberYes

πŸ“˜

Decimal-point values are allowed to be passed in to the method, but they will be rounded when the player sets the size.

jwplayer().resize('50%', 250)
© 2007-2024 Longtail Ad Solutions, Inc.