Initial commit
This commit is contained in:
41
Backend/dist/Integrations/buildin/zoom/actions/switchToSpeakerView.js
vendored
Normal file
41
Backend/dist/Integrations/buildin/zoom/actions/switchToSpeakerView.js
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
exports.__esModule = true;
|
||||
var axios_1 = require("axios");
|
||||
module.exports = function (actionAPI) {
|
||||
actionAPI.handle(function (properties, status) {
|
||||
var connectionID = properties.connectionID != undefined && properties.connectionID.length > 0
|
||||
? properties.connectionID
|
||||
: 'none';
|
||||
if (connectionID != 'none') {
|
||||
var connection = actionAPI.getConnection('zoom-bridge', connectionID);
|
||||
axios_1["default"]
|
||||
.get("http://" + connection.properties.ip + ":" + connection.properties.port + "/v1/view/speaker")
|
||||
.then(function () {
|
||||
status('Action completed');
|
||||
})["catch"](function () {
|
||||
status('Unable to reach Zoom-Bridge');
|
||||
});
|
||||
}
|
||||
else
|
||||
status('No connection specified', 'error');
|
||||
});
|
||||
actionAPI.onOpenEditor(function (editorAPI, properties) {
|
||||
var connectionID = properties.connectionID != undefined && properties.connectionID.length > 0
|
||||
? properties.connectionID
|
||||
: 'none';
|
||||
var connectionField = {
|
||||
id: 'connectionID',
|
||||
name: 'connection',
|
||||
type: 'connection',
|
||||
connectionType: 'zoom-bridge',
|
||||
value: connectionID
|
||||
};
|
||||
editorAPI.onFieldChanges(function (fields) {
|
||||
var values = editorAPI.tools.objectifyFieldsValues(fields);
|
||||
editorAPI.saveProperties({ connectionID: values.connectionID });
|
||||
});
|
||||
editorAPI.setFields([
|
||||
connectionField
|
||||
]);
|
||||
});
|
||||
};
|
||||
//# sourceMappingURL=switchToSpeakerView.js.map
|
||||
Reference in New Issue
Block a user