require.js, AMD and "missing license key" using jwPlayer 7
<p>As happy as I was that jwPlayer 7 is using a compatible format in their js file, I'm currently working with a setup including require.js and I'm getting a player on my site but it shows "Error setting up player: Missing license key".</p>

<p><em>This is in the template file</em></p>

<pre><code>&lt;div id="jwPlayerWrapper"&gt;&lt;/div&gt;
&lt;script&gt;
  require(['jwplayer','initJwplayer'], function(jwplayer, BackgroundJwPlayer) {
    jwplayer.key="[HereWouldBeMyKey]"; // tried this first
    var controller = new BackgroundJwPlayer('jwPlayerWrapper', jwplayer);
    controller.init();
  });
&lt;/script&gt;
</code></pre>

<p>The alias jwplayer points to the original player script downloaded from my account dashboard that initializes/returns the jwplayer object.
The file behind initJwplayer contains the init of the BackgroundJwPlayer object and calling the init function on this will set up the player.</p>

<p>I tried defining the key from within the require block inside the template as well as inside the init function before calling jwplayer.setup, both with little success.</p>

<p><em>This is from the initJwplayer.js</em></p>

<pre><code>var BackgroundJwPlayer = function(target, jwplayer) {

    // jwplayer.key="[HereWouldBeMyKey]"; // tried this second

    this.containerSelector = target;
    this.jwplayer = jwplayer;

};

BackgroundJwPlayer.prototype.init = function() {
    var player = this,
        jwplayer = player.jwplayer;

    // jwplayer.key="[HereWouldBeMyKey]"; // tried this third

    // Calling new jwplayer class
    var playerInstance = jwplayer(player.containerSelector);

    playerInstance.setup({
        file: "/video/some_video.mp4",
        image: "/images/some_video_preview.jpg",
        width: 640,
        height: 360,
        title: 'Basic Video Embed',
        description: 'A video with a basic title and description!',
        mediaid: '123456'
    });
};

return BackgroundJwPlayer;
</code></pre>

<p>Everything else seems to work fine, the player is initialized, recognized and stuff... only the key is missing, even though its there.</p>

<p>Any help greatly appreciated.</p>