Skip to content

Commit

Permalink
Remove autoLoad
Browse files Browse the repository at this point in the history
  • Loading branch information
Andries-Smit committed Apr 6, 2017
1 parent bdcc158 commit efb8c38
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 4 deletions.
Binary file modified dist/1.1.0/JWPlayer.mpk
Binary file not shown.
11 changes: 8 additions & 3 deletions src/JWPlayer/widget/JWPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
========================
Expand Down Expand Up @@ -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 = [];
Expand All @@ -96,13 +99,15 @@ 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) {
this.domNode.appendChild(playNode);
this.playerInstance = jwplayerFree(playNode);
this._setupEvents();
window.jwplayer = jwplayerFree; // need to register to global space. else Flash is failing....
this.set("loaded", true);
}));
}
},
Expand Down
33 changes: 33 additions & 0 deletions src/JWPlayer/widget/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
<file path="JWPlayer/widget/" />
</files>
</clientModule>
</package>
</package>
Binary file modified test/Mx5.14.1/Widgets/JWPlayer.mpk
Binary file not shown.
Binary file modified test/Mx5.21/widgets/JWPlayer.mpk
Binary file not shown.
Binary file modified test/MxMainline/widgets/JWPlayer.mpk
Binary file not shown.

0 comments on commit efb8c38

Please sign in to comment.