feat(video-quality): add iframe event and getter.
This commit is contained in:
parent
25839b18d2
commit
fc75d45c6c
|
@ -524,6 +524,19 @@ class API {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notify external application that the video quality setting has changed.
|
||||||
|
*
|
||||||
|
* @param {number} videoQuality - The video quality. The number represents the maximum height of the video streams.
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
notifyVideoQualityChanged(videoQuality: number) {
|
||||||
|
this._sendEvent({
|
||||||
|
name: 'video-quality-changed',
|
||||||
|
videoQuality
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify external application (if API is enabled) that message was
|
* Notify external application (if API is enabled) that message was
|
||||||
* received.
|
* received.
|
||||||
|
|
|
@ -80,6 +80,7 @@ const events = {
|
||||||
'video-conference-left': 'videoConferenceLeft',
|
'video-conference-left': 'videoConferenceLeft',
|
||||||
'video-availability-changed': 'videoAvailabilityChanged',
|
'video-availability-changed': 'videoAvailabilityChanged',
|
||||||
'video-mute-status-changed': 'videoMuteStatusChanged',
|
'video-mute-status-changed': 'videoMuteStatusChanged',
|
||||||
|
'video-quality-changed': 'videoQualityChanged',
|
||||||
'screen-sharing-status-changed': 'screenSharingStatusChanged',
|
'screen-sharing-status-changed': 'screenSharingStatusChanged',
|
||||||
'dominant-speaker-changed': 'dominantSpeakerChanged',
|
'dominant-speaker-changed': 'dominantSpeakerChanged',
|
||||||
'subject-change': 'subjectChange',
|
'subject-change': 'subjectChange',
|
||||||
|
@ -503,6 +504,9 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||||
changeParticipantNumber(this, -1);
|
changeParticipantNumber(this, -1);
|
||||||
delete this._participants[this._myUserID];
|
delete this._participants[this._myUserID];
|
||||||
break;
|
break;
|
||||||
|
case 'video-quality-changed':
|
||||||
|
this._videoQuality = data.videoQuality;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const eventName = events[name];
|
const eventName = events[name];
|
||||||
|
@ -689,6 +693,15 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||||
return getCurrentDevices(this._transport);
|
return getCurrentDevices(this._transport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current video quality setting.
|
||||||
|
*
|
||||||
|
* @returns {number}
|
||||||
|
*/
|
||||||
|
getVideoQuality() {
|
||||||
|
return this._videoQuality;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the audio is available.
|
* Check if the audio is available.
|
||||||
*
|
*
|
||||||
|
|
|
@ -152,6 +152,7 @@ export default [
|
||||||
'testing',
|
'testing',
|
||||||
'useStunTurn',
|
'useStunTurn',
|
||||||
'useTurnUdp',
|
'useTurnUdp',
|
||||||
|
'videoQuality.persist',
|
||||||
'webrtcIceTcpDisable',
|
'webrtcIceTcpDisable',
|
||||||
'webrtcIceUdpDisable'
|
'webrtcIceUdpDisable'
|
||||||
].concat(extraConfigWhitelist);
|
].concat(extraConfigWhitelist);
|
||||||
|
|
|
@ -15,6 +15,8 @@ import { getReceiverVideoQualityLevel } from './functions';
|
||||||
import logger from './logger';
|
import logger from './logger';
|
||||||
import { getMinHeightForQualityLvlMap } from './selector';
|
import { getMinHeightForQualityLvlMap } from './selector';
|
||||||
|
|
||||||
|
declare var APP: Object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements the middleware of the feature video-quality.
|
* Implements the middleware of the feature video-quality.
|
||||||
*
|
*
|
||||||
|
@ -213,4 +215,8 @@ StateListenerRegistry.register(
|
||||||
if (changedConference || changedPreferredVideoQuality) {
|
if (changedConference || changedPreferredVideoQuality) {
|
||||||
_setSenderVideoConstraint(conference, preferredVideoQuality);
|
_setSenderVideoConstraint(conference, preferredVideoQuality);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof APP !== 'undefined' && changedPreferredVideoQuality) {
|
||||||
|
APP.API.notifyVideoQualityChanged(preferredVideoQuality);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue