title: jwplayer not recognized in a drupal page
body: <p>I've inserted a jwplayer in one of my drupal website node but I can't use Javascript API. I work with examples <a href="http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12540/javascript-api-reference" rel="nofollow noreferrer">from here</a>, and I tried to embed it and to setup from Javascript as well.</p>
  
  <p>Here is a sequence of my module's <code>hook_nodeapi</code>:</p>
  
  <pre><code>case 'view':
    // irrelevant code
    $node-&gt;content['body'] = array (
      '#value' =&gt; "&lt;div id='player'&gt;Loading the player ...&lt;/div&gt;",
      '#weight' =&gt; 9,
    );
    drupal_add_js('sites/all/libraries/mediaplayer-5.7/jwplayer.js', 'file');
    drupal_add_js('sites/all/libraries/mediaplayer-5.7/swfobject.js', 'file');
    drupal_add_js("jwplayer('player').setup({
      flashplayer: 'http://localhost:8088/sites/all/libraries/mediaplayer-5.7/player.swf',
      file: 'http://localhost:8088/" . $node-&gt;field_video[0]['filepath'] . "',
      height: 270,
      width: 480
    });", 'inline');
  break;
  </code></pre>
  
  <p>The two javascript files are successfully appended to drupal page's HTML output, and the div appears too, but when it comes to the inline script, I get an error because jwplayer is not recognized. I scanned some references and I found out that the problem might be in a Flash security issue, so I went to Flash Player's Global Settings -> Advanced -> Trusted Location Settings and I added my player.swf, the site web address and the whole directory of jwplayer as well. But nothing changed.</p>
  
  <p>How can I solve this problem? Will appreciate any ideas.</p>
  
  <p><img src="https://i.stack.imgur.com/VxPfE.png" alt="Console log of the script error"></p>