mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(IFrameApi): setAudioOnly command & event.
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
requestEnableVideoModeration
|
||||
} from '../../react/features/av-moderation/actions';
|
||||
import { isEnabledFromState } from '../../react/features/av-moderation/functions';
|
||||
import { setAudioOnly } from '../../react/features/base/audio-only/actions';
|
||||
import {
|
||||
endConference,
|
||||
sendTones,
|
||||
@@ -565,6 +566,10 @@ function initCommands() {
|
||||
sendAnalytics(createApiEvent('set.video.quality'));
|
||||
APP.store.dispatch(setVideoQuality(frameHeight));
|
||||
},
|
||||
'set-audio-only': enable => {
|
||||
sendAnalytics(createApiEvent('set.audio.only'));
|
||||
APP.store.dispatch(setAudioOnly(enable));
|
||||
},
|
||||
'start-share-video': url => {
|
||||
sendAnalytics(createApiEvent('share.video.start'));
|
||||
const id = extractYoutubeIdOrURL(url);
|
||||
@@ -2218,6 +2223,19 @@ class API {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the external application (if API is enabled) when the audio only enabled status changed.
|
||||
*
|
||||
* @param {boolean} enabled - Whether the audio only is enabled or not.
|
||||
* @returns {void}
|
||||
*/
|
||||
notifyAudioOnlyChanged(enabled) {
|
||||
this._sendEvent({
|
||||
name: 'audio-only-changed',
|
||||
enabled
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Disposes the allocated resources.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user