|
@@ -14,6 +14,7 @@ import {
|
14
|
14
|
requestEnableVideoModeration
|
15
|
15
|
} from '../../react/features/av-moderation/actions';
|
16
|
16
|
import { isEnabledFromState } from '../../react/features/av-moderation/functions';
|
|
17
|
+import { setAudioOnly } from '../../react/features/base/audio-only/actions';
|
17
|
18
|
import {
|
18
|
19
|
endConference,
|
19
|
20
|
sendTones,
|
|
@@ -565,6 +566,10 @@ function initCommands() {
|
565
|
566
|
sendAnalytics(createApiEvent('set.video.quality'));
|
566
|
567
|
APP.store.dispatch(setVideoQuality(frameHeight));
|
567
|
568
|
},
|
|
569
|
+ 'set-audio-only': enable => {
|
|
570
|
+ sendAnalytics(createApiEvent('set.audio.only'));
|
|
571
|
+ APP.store.dispatch(setAudioOnly(enable));
|
|
572
|
+ },
|
568
|
573
|
'start-share-video': url => {
|
569
|
574
|
sendAnalytics(createApiEvent('share.video.start'));
|
570
|
575
|
const id = extractYoutubeIdOrURL(url);
|
|
@@ -2218,6 +2223,19 @@ class API {
|
2218
|
2223
|
});
|
2219
|
2224
|
}
|
2220
|
2225
|
|
|
2226
|
+ /**
|
|
2227
|
+ * Notify the external application (if API is enabled) when the audio only enabled status changed.
|
|
2228
|
+ *
|
|
2229
|
+ * @param {boolean} enabled - Whether the audio only is enabled or not.
|
|
2230
|
+ * @returns {void}
|
|
2231
|
+ */
|
|
2232
|
+ notifyAudioOnlyChanged(enabled) {
|
|
2233
|
+ this._sendEvent({
|
|
2234
|
+ name: 'audio-only-changed',
|
|
2235
|
+ enabled
|
|
2236
|
+ });
|
|
2237
|
+ }
|
|
2238
|
+
|
2221
|
2239
|
/**
|
2222
|
2240
|
* Disposes the allocated resources.
|
2223
|
2241
|
*
|