Ticket #1127 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Unscoped variable can conflict with other HTML elements

Reported by: pablo Owned by: pablo
Priority: Milestone: Player 5.4
Component: embedding Keywords:
Cc: Forum thread: http://www.longtailvideo.com/support/forums/jw-player/bug-reports/15706/bug-in-jwplayerembedjsontoflashvars#comment-93123

Description

From Eric Cholet:

Using jwplayer.js to embed the player, it wasn't working in IE. It turns out that line 391 in jwplayer.embed.jsonToFlashvars uses a variable "key" not declared as private

for (key in json)

(from http://developer.longtailvideo.com/trac/browser/trunk/fl5/js/src/embed/jwplayer.embed.js)

In my HTML page I had a <input id="key" name="key">. Under IE this makes jwplayer().setup() fail. I changed my input id to something else and that fixed the problem. Nevertheless I think that in your js code, the "key" variable should be declared as "var key".

Change History

comment:1 Changed 2 years ago by zach

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in 1454

Note: See TracTickets for help on using tickets.