Adds setting subject and adding event on receiving such change.

This commit is contained in:
damencho
2019-02-17 14:40:24 +00:00
committed by Дамян Минков
parent 54c36198d0
commit fc129d9849
7 changed files with 102 additions and 2 deletions
+18
View File
@@ -63,6 +63,10 @@ function initCommands() {
'proxy-connection-event': event => {
APP.conference.onProxyConnectionEvent(event);
},
'subject': subject => {
sendAnalytics(createApiEvent('subject.changed'));
APP.conference.setSubject(subject);
},
'submit-feedback': feedback => {
sendAnalytics(createApiEvent('submit.feedback'));
APP.conference.submitFeedback(feedback.score, feedback.message);
@@ -551,6 +555,20 @@ class API {
});
}
/**
* Notify external application (if API is enabled) that the conference
* changed their subject.
*
* @param {string} subject - Conference subject.
* @returns {void}
*/
notifySubjectChanged(subject: string) {
this._sendEvent({
name: 'subject-change',
subject
});
}
/**
* Disposes the allocated resources.
*