![](https://secure.gravatar.com/avatar/db4c50f37e4844b35cf9307ce2f7ac49?rating=PG&size=50&default=https%3A%2F%2Fcdn.desk.com%2Fassets%2Funknown_user_50-8ad5644bbe6b1bd7454f2ea465f782bd.png)
resize() not working with percentage
when I input percentage as parameters, like
jwplayer().resize(50%,50%)
I get a javascript error: Uncaught SyntaxError: Unexpected token ,
What did I do wrong?
when I input percentage as parameters, like
jwplayer().resize(50%,50%)
I get a javascript error: Uncaught SyntaxError: Unexpected token ,
What did I do wrong?
Try enclosing your percent values in quotes:
jwplayer().resize('50%','50%')
Try enclosing your percent values in quotes:
jwplayer().resize('50%','50%')
Additionally, I don’t believe you’re going to be able to set a percentage for both height and width here. You can use (‘50%’, 500) or something similar, however.
You can use percentage for both width and height provided the players parent container inherits, or has an explicit, width and height.
James Herrieven