diff --git a/dist/1.1.0/JWPlayer.mpk b/dist/1.1.0/JWPlayer.mpk index 0b21756..dc8e189 100644 Binary files a/dist/1.1.0/JWPlayer.mpk and b/dist/1.1.0/JWPlayer.mpk differ diff --git a/src/JWPlayer/widget/JWPlayer.js b/src/JWPlayer/widget/JWPlayer.js index 5f5fc39..500d57a 100644 --- a/src/JWPlayer/widget/JWPlayer.js +++ b/src/JWPlayer/widget/JWPlayer.js @@ -5,11 +5,11 @@ ======================== @file : JWPlayer.js - @version : 1.0.0 + @version : 1.1.0 @author : Andries Smit - @date : 2015-12-24 + @date : 2017-04-06 @copyright : Flock of Birds International BV - @license : MIT + @license : Apache License, Version 2.0 Documentation ======================== @@ -71,6 +71,9 @@ define(["dojo/_base/declare", "mxui/widget/_WidgetBase", "dojo/_base/lang", playerInstance: null, _contextObj: null, mapLogoPosition: [], + // force loading to wait for jwlibs to load async + autoLoad: false, + // dojo.declare.constructor is called to construct the widget instance. Implement to initialize non-primitive properties. constructor: function () { this._handles = []; @@ -96,6 +99,7 @@ define(["dojo/_base/declare", "mxui/widget/_WidgetBase", "dojo/_base/lang", this.playerInstance.key = this.licenseKey; this._setupEvents(); window.jwplayer = jwplayerLicensed; // need to register to global space. else Flash is failing.... + this.set("loaded", true); })); } else { require(["JWPlayer/lib/free/jwplayer"], dojoLang.hitch(this, function (jwplayerFree) { @@ -103,6 +107,7 @@ define(["dojo/_base/declare", "mxui/widget/_WidgetBase", "dojo/_base/lang", this.playerInstance = jwplayerFree(playNode); this._setupEvents(); window.jwplayer = jwplayerFree; // need to register to global space. else Flash is failing.... + this.set("loaded", true); })); } }, diff --git a/src/JWPlayer/widget/package.json b/src/JWPlayer/widget/package.json new file mode 100644 index 0000000..0a69480 --- /dev/null +++ b/src/JWPlayer/widget/package.json @@ -0,0 +1,33 @@ +{ + "name": "JWPlayer", + "version": "1.1.0", + "description": "JW Player", + "copyright": "Flock of Birds International BV", + "private": true, + "license" : "Apache License, Version 2.0", + "dependencies": {}, + "devDependencies": { + "grunt": "0.4.5", + "grunt-contrib-clean": "^0.6.0", + "grunt-contrib-compress": "^0.14.0", + "grunt-contrib-copy": "^0.8.2", + "grunt-contrib-uglify": "^0.10.0", + "grunt-contrib-watch": "^0.6.1", + "grunt-newer": "^1.1.1", + "grunt-xmlmin": "^0.1.7", + "node-base64-image": "^0.1.0", + "node-mendix-modeler-path": "https://github.com/JelteMX/node-mendix-modeler-path/archive/v1.0.0.tar.gz", + "shelljs": "^0.5.3", + "xml2js": "^0.4.15" + }, + "repository": { + "type": "git", + "url": "http://github.com/Andries-Smit/MX-JW-Player" + }, + "engines": { + "node": ">=0.12.0" + }, + "scripts": { + "test": "grunt test" + } +} diff --git a/src/package.xml b/src/package.xml index 64b149e..09cecd9 100644 --- a/src/package.xml +++ b/src/package.xml @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/test/Mx5.14.1/Widgets/JWPlayer.mpk b/test/Mx5.14.1/Widgets/JWPlayer.mpk index 0b21756..dc8e189 100644 Binary files a/test/Mx5.14.1/Widgets/JWPlayer.mpk and b/test/Mx5.14.1/Widgets/JWPlayer.mpk differ diff --git a/test/Mx5.21/widgets/JWPlayer.mpk b/test/Mx5.21/widgets/JWPlayer.mpk index 0b21756..dc8e189 100644 Binary files a/test/Mx5.21/widgets/JWPlayer.mpk and b/test/Mx5.21/widgets/JWPlayer.mpk differ diff --git a/test/MxMainline/widgets/JWPlayer.mpk b/test/MxMainline/widgets/JWPlayer.mpk index 0b21756..dc8e189 100644 Binary files a/test/MxMainline/widgets/JWPlayer.mpk and b/test/MxMainline/widgets/JWPlayer.mpk differ