mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: typed OpenViduAdvancedConfiguration#publisherSpeakingEventsOptions
parent
7895ac0562
commit
d320da622c
|
@ -392,7 +392,7 @@ export class StreamManager extends EventDispatcher {
|
|||
* - `interval`: (number) how frequently the analyser polls the audio stream to check if speaking has started/stopped or audio volume has changed. Default **100** (ms)
|
||||
* - `threshold`: (number) the volume at which _publisherStartSpeaking_, _publisherStopSpeaking_ events will be fired. Default **-50** (dB)
|
||||
*/
|
||||
updatePublisherSpeakingEventsOptions(publisherSpeakingEventsOptions): void {
|
||||
updatePublisherSpeakingEventsOptions(publisherSpeakingEventsOptions: { interval?: number, threshold?: number }): void {
|
||||
const currentHarkOptions = !!this.stream.harkOptions ? this.stream.harkOptions : (this.stream.session.openvidu.advancedConfiguration.publisherSpeakingEventsOptions || {});
|
||||
const newInterval = (typeof publisherSpeakingEventsOptions.interval === 'number') ?
|
||||
publisherSpeakingEventsOptions.interval : ((typeof currentHarkOptions.interval === 'number') ? currentHarkOptions.interval : 100);
|
||||
|
|
|
@ -39,7 +39,10 @@ export interface OpenViduAdvancedConfiguration {
|
|||
*
|
||||
* This sets the global default configuration that will affect all streams, but you can later customize these values for each specific stream by calling [[StreamManager.updatePublisherSpeakingEventsOptions]]
|
||||
*/
|
||||
publisherSpeakingEventsOptions?: any;
|
||||
publisherSpeakingEventsOptions?: {
|
||||
interval?: number;
|
||||
threshold?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Determines the automatic reconnection process policy. Whenever the client's network drops, OpenVidu Browser starts a reconnection process with OpenVidu Server. After network is recovered, OpenVidu Browser automatically
|
||||
|
|
Loading…
Reference in New Issue