
Dynamic Player Size - throwing event error
Hi, I found a piece of code on your site earlier today, that seemed to work fine. But then it just stopped and now I get an error in the console: "There was an error calling back an event handler". This is on development server, so I can't easily send a link...
When running setup on the videoplayer:
bc.. events: {
onMeta: function(event) {
if(event.metadata.width != undefined && event.metadata.height != undefined && event.metadata.width != 0)
{
var playerWidth = event.metadata.width;
if (playerWidth > 640) {
playerWidth = 640;
}
var playerHeight = (event.metadata.height/event.metadata.width)*playerWidth;
jwplayer().resize(playerWidth, playerHeight);
}
}
}