mirror of https://github.com/sipwise/jitsi.git
Local user sound level indicator listeners and implementation in the UI + some fixes in the call conference ui
parent
b9aaf11106
commit
8a0d4781ec
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
|
||||
*
|
||||
* Distributable under LGPL license.
|
||||
* See terms of license at gnu.org.
|
||||
*/
|
||||
package net.java.sip.communicator.service.protocol.event;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import net.java.sip.communicator.service.protocol.*;
|
||||
|
||||
/**
|
||||
* @author Yana Stamcheva
|
||||
*/
|
||||
public class LocalUserSoundLevelEvent
|
||||
extends EventObject
|
||||
{
|
||||
/**
|
||||
* The maximum level that can be reported for a participant in a conference.
|
||||
* Level values should be distributed among MAX_LEVEL and MIN_LEVEL in a
|
||||
* way that would appear uniform to users.
|
||||
*/
|
||||
public static final int MAX_LEVEL = 255;
|
||||
|
||||
/**
|
||||
* The maximum (zero) level that can be reported for a participant in a
|
||||
* conference. Level values should be distributed among MAX_LEVEL and
|
||||
* MIN_LEVEL in a way that would appear uniform to users.
|
||||
*/
|
||||
public static final int MIN_LEVEL = 0;
|
||||
|
||||
/**
|
||||
* The audio stream level, for the change of which this event is about.
|
||||
*/
|
||||
private final int level;
|
||||
|
||||
/**
|
||||
* Creates an <tt>StreamSoundLevelEvent</tt> for the given <tt>callPeer</tt>
|
||||
* by indicating the current sound level of the audio stream.
|
||||
*
|
||||
* @param protocolProvider the <tt>ProtocolProviderService</tt>
|
||||
* @param level the current sound level of the audio stream
|
||||
*/
|
||||
public LocalUserSoundLevelEvent(
|
||||
ProtocolProviderService protocolProvider, int level)
|
||||
{
|
||||
super(protocolProvider);
|
||||
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the <tt>ProtocolProviderService</tt>.
|
||||
* @return the <tt>ProtocolProviderService</tt>
|
||||
*/
|
||||
public ProtocolProviderService getSourceProvider()
|
||||
{
|
||||
return (ProtocolProviderService) getSource();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current sound level of the audio stream.
|
||||
* @return the current sound level of the audio stream
|
||||
*/
|
||||
public int getLevel()
|
||||
{
|
||||
return level;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
|
||||
*
|
||||
* Distributable under LGPL license.
|
||||
* See terms of license at gnu.org.
|
||||
*/
|
||||
package net.java.sip.communicator.service.protocol.event;
|
||||
|
||||
/**
|
||||
* Notifies interested parties in sound level changes of the local user audio
|
||||
* stream.
|
||||
* @author Yana Stamcheva
|
||||
*/
|
||||
public interface LocalUserSoundLevelListener
|
||||
{
|
||||
/**
|
||||
* Indicates that a change has occurred in the sound level of the local
|
||||
* user.
|
||||
* @param event the <tt>LocalUserSoundLevelEvent</tt> containing the new
|
||||
* level
|
||||
*/
|
||||
public void localUserSoundLevelChanged(LocalUserSoundLevelEvent event);
|
||||
}
|
||||
Loading…
Reference in new issue