@bradmax/player-rxjs
Version:
Bradmax Player ReactJs.
35 lines • 1.41 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
require("@bradmax/player/gorilla");
var version_1 = require("@bradmax/player/version");
var React = require("react");
var BradmaxPlayerGorilla = (function (_super) {
tslib_1.__extends(BradmaxPlayerGorilla, _super);
function BradmaxPlayerGorilla() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.theme = 'gorilla';
_this.container = null;
_this.player = null;
_this.api = null;
return _this;
}
BradmaxPlayerGorilla.prototype.componentDidMount = function () {
if (this.container != null) {
this.player = bradmax.player.create(this.container, this.props, this.theme + "_" + version_1.BRADMAX_PLAYER_VERSION);
this.api = this.player.modules.JavascriptApi;
}
};
BradmaxPlayerGorilla.prototype.componentWillUnmount = function () {
if (this.player != null) {
bradmax.player.destroy(this.player);
}
};
BradmaxPlayerGorilla.prototype.render = function () {
var _this = this;
return (<div className="bradmax-player gorilla" ref={function (r) { return _this.container = r; }}/>);
};
return BradmaxPlayerGorilla;
}(React.Component));
exports.default = BradmaxPlayerGorilla;
//# sourceMappingURL=index.js.map
;