title: Javascript API not working for Chrome or Safari on JW Player 5.9
body: <p>I am working on a custom interface for the JW Player which displays the current track title and has play/pause, next track, previous track and volume toggle buttons.</p>
  
  <p>It works for IE8/9 and FF but fails for Chrome and Safari. Chrome's console gives the following error: <em>Uncaught TypeError: Object # has no method 'addControllerListener'</em></p>
  
  <p>This is the code I am using for testing.</p>
  
  <pre><code>&lt;div id="container"&gt;Loading the player ...&lt;/div&gt;
  &lt;script type="text/javascript"&gt;
      jwplayer("container").setup({
          image: "preview.jpg",
          height: 320,
          width: 480,
          modes: [
              { type: "html5" },
              { type: "flash", src: "player.swf" }
          ],
          'playlist': [
              { 'file': "audio/01.mp3", 'title': "Track 1" },
              { 'file': "audio/02.mp3", 'title': "Track 2" },
              { 'file': "audio/03.mp3", 'title': "Track 3" }
          ],
      });
  
      function playerReady(obj)
      {
          player = document.getElementById(obj.id);
          displayFirstItem();
      };
  
      function displayFirstItem()
      {
          try
          {
              playlist = player.getPlaylist();
          }
          catch(e)
          { 
              setTimeout("displayFirstItem()", 100);
          }
  
          player.addControllerListener('ITEM', 'itemMonitor');
          itemMonitor({index:0});
      };
  
      function itemMonitor(obj)
      {
          $('#nowplaying').html('&lt;span&gt;&lt;strong&gt;Now Playing:&lt;/strong&gt; ' + playlist[obj.index]['title'] + '&lt;/span&gt;');
      };
  &lt;/script&gt;
  &lt;div id="nowplaying"&gt;&lt;/div&gt;
  &lt;div class="control_bar"&gt;
      &lt;ul&gt;
           &lt;li onclick='player.sendEvent("play");'&gt;[ &amp;#8250; ] Play / Pause&lt;/li&gt;
           &lt;li onclick='player.sendEvent("prev");'&gt;[ &amp;laquo; ] Previous item&lt;/li&gt;
           &lt;li onclick='player.sendEvent("next");'&gt;[ &amp;raquo; ] Next item&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have searched and tried several modifications, like adding the javascriptid parameter, nothing seems to work for Chrome or Safari. </p>
  
  <p>Any ideas? Thanks</p>