21 lines
1.0 KiB
JavaScript
21 lines
1.0 KiB
JavaScript
exports.__esModule = true;
|
|
var axios_1 = require("axios");
|
|
module.exports = function (api) {
|
|
api.registerAction('overview', 'Show slide overview', require('./actions/overview'));
|
|
api.registerAction('previous', 'Previous slide', require('./actions/previous'));
|
|
api.registerAction('next', 'Next slide', require('./actions/next'));
|
|
api.registerConnectionValidator('powerpoint-bridge', function (validatorAPI) {
|
|
if (validatorAPI.properties.ip != undefined && validatorAPI.properties.port != undefined) {
|
|
axios_1["default"]
|
|
.get("http://" + validatorAPI.properties.ip + ":" + validatorAPI.properties.port + "/v1/ping")
|
|
.then(function () {
|
|
validatorAPI.callback(true);
|
|
})["catch"](function () {
|
|
validatorAPI.callback(false, 'Unable to reach Powerpoint-Bridge');
|
|
});
|
|
}
|
|
else
|
|
validatorAPI.callback(false, 'No ip or port specified');
|
|
});
|
|
};
|
|
//# sourceMappingURL=powerpoint.js.map
|