Hello,

I was trying to add events to a player on my website, but I found out that any attempt to configure functions to be run on player events resulted in a "player ready" alert.

This issue appears to be due to this part of player initialization, which can be found in jwplayermodule_jwembedder.js:

//A bit of a hack, but necessary to get inline events working.
    for (var index in config.events) {
      var temp = "";
      eval("temp = function() {alert('Player Ready')}");
      config.events[index] = temp;
    }

Changing the line
eval("temp = function() {alert('Player Ready')}");
to
eval("temp = "+config.events[index]);
solved the issue for me.

Please check if this can be applied as a patch.

CommentFileSizeAuthor
#2 fix_events-1548480-2.patch579 bytesdeciphered

Comments

JW Player’s picture

Yeah I definitely can put that out as a patch. That was a debug statement that shouldn't have made it to the released version.

My apologies for the inconvenience.

deciphered’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new579 bytes