Package org.linphone.core
Interface Conference
public interface Conference
A conference is the object that allow to make calls when there are 2 or more
participants.
To create (or find) a
object.
conference. A conference is uniquely identified by a conference address,
meaning you can have more than one conference between two accounts. To find a
conference among those a core is part of, you can call
.
A
outgoing call is made to a conference server. Thanks to the standard 'isfocus'
contact parameter, the call is identified as belonging to a conference. The
conference object can then be retrieved with
participants.
To create (or find) a
Conference, you first need a ConferenceParamsobject.
Core.createConferenceWithParams(org.linphone.core.ConferenceParams) allows you to create aconference. A conference is uniquely identified by a conference address,
meaning you can have more than one conference between two accounts. To find a
conference among those a core is part of, you can call
Core.searchConference(org.linphone.core.ConferenceParams, org.linphone.core.Address, org.linphone.core.Address, org.linphone.core.Address[]).
A
Conference may be created automatically and implicitely when anoutgoing call is made to a conference server. Thanks to the standard 'isfocus'
contact parameter, the call is identified as belonging to a conference. The
conference object can then be retrieved with
Call.getConference(). -
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumstatic enumstatic enumstatic enum -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(ConferenceListener listener) intaddParticipant(Address uri) Join a participant to the conference.intaddParticipant(Call call) Join an existing call to the conference.intaddParticipants(Address[] addresses) Add participants to the conference, by supplying a list ofAddress.intaddParticipants(Call[] calls) Add participants to the conference, by supplying a list ofCall.intenter()For a local conference, the local participant joins the conference For a client
conference, the participant rejoins the conference after leaving it earlier on.findParticipant(Address uri) Find a participant from a conference.Gets theAccountobject associated with the conference.Get the currently active speaker participant device.getCall()Gets the call that is controlling a conference.Returns theChatRoomlinked to theConference.Get the conference address of the conference.getCore()Returns core for aConference.Get current parameters of the conference.intGet the conference duration.Returns the conference identifier.getInfo()Gets theConferenceInfoobject associated with a conference.Gets the current input device for this conference.floatRetrieves the volume of a specific participant.getMe()For a local audio video conference, this function returns the participant
hosting the conference For a remote audio video conference, this function
returns the local participant of the conference.booleanRetrieves the volume of a specific participant.longGets the native pointer used by this class to make native method calls.Gets the current output device for this conference.intGet number of participants without me.Get list of all participant devices of a conference including me if it is in.intRetrieves the volume of a specific participant.Get list of all participants of a conference.Address[]Deprecated.Gets a player associated with the conference to play a local file and stream it
to the remote peers.Get the participant that is currently screen sharing.Get the participant device that is currently screen sharing.longGet the conference start time.getState()Get the current state of the conference.Get the conference subject.Get the conference subject as an UTF-8 string.Gets the object stored in this object user's dataGet the conference username.intinviteParticipants(Address[] addresses, CallParams params) Invite participants to the conference, by supplying a list ofAddress
If the conference is in the state LinphoneConferenceStateCreationPending, then
the conference will start on the input and output audio devices used for the
currently active call, if any This method will call every address supplied and
add it to a conference on devices hosting a conference.booleanisIn()For a local conference, it returns whether the local participant is enabled For
a client conference, it return whether the remote participant has left the
conference without bein removed from it.booleanFor a local audio video conference, this function compares the address provided
as argument with that of participant hosting the conference For a remote audio
video conference, this function compares the address provided as argument with
that of the local participant of the conference.booleanGets whether the conference is currently being recorded.intleave()For a local conference, the local participant leaves the conference For a
client conference, the participant leaves the conference after joining it
earlier on.voidremoveListener(ConferenceListener listener) intremoveParticipant(Address uri) Deprecated.intremoveParticipant(Call call) Deprecated.intremoveParticipant(Participant participant) voidsetConferenceAddress(Address address) Set the conference address.voidsetInputAudioDevice(AudioDevice audioDevice) Sets the givenAudioDeviceas input for this conference only.voidsetLocalParticipantStreamCapability(MediaDirection direction, StreamType streamType) Set stream capability on 'me' device of a local conference.voidsetMicrophoneMuted(boolean muted) Get microphone muted state.voidsetOutputAudioDevice(AudioDevice audioDevice) Sets the givenAudioDeviceas output for this conference only.voidsetParticipantAdminStatus(Participant participant, boolean isAdmin) Change the admin status of a participant of a conference (you need to be an
admin yourself to do this).voidsetSubject(String subject) Set the conference subject.voidsetSubjectUtf8(String subject) Set the conference subject as an UTF-8 string.voidsetUserData(Object data) Sets the object to store in this object user's datavoidsetUsername(String username) Set the conference username.intstartRecording(String path) Starts recording the conference.stateToString(Conference.State state) A function to convert aConference.Stateinto a string.intStops the conference recording.intTerminates conference.toString()intupdateParams(ConferenceParams params) Update parameters of the conference.
-
Method Details
-
getAccount
- Returns:
- A
Accountobject.
-
getActiveSpeakerParticipantDevice
Get the currently active speaker participant device.
- Returns:
- the
ParticipantDevicecurrently displayed as active speaker.
-
getCall
Gets the call that is controlling a conference.
-for the local conference, it will return null
-for the client conference, it will return call associated to the conference- Returns:
- the
Callcontrolling the conference or null if none or local
conference
-
getChatRoom
- Returns:
- back pointer to
ChatRoomobject.
-
getConferenceAddress
Get the conference address of the conference.
This function may be return a null pointer if called before the conference
switches to the Created state- Returns:
- The conference address of the conference.
-
setConferenceAddress
Set the conference address.
- Parameters:
address- the conference address to set.
warning: This is only allowed for a client conference if it is in state
CreationPending or Instantiated
-
getCore
- Returns:
- back pointer to
Coreobject.
-
getCurrentParams
Get current parameters of the conference.
- Returns:
- a
ConferenceParams.
-
getDuration
@Nullable int getDuration()Get the conference duration.
- Returns:
- conference duration.
-
getIdentifier
Returns the conference identifier.
warning: This method returns a null pointer if the Conference is in the
Instantiated state- Returns:
- the conference identifier.
-
getInfo
- Returns:
- A
ConferenceInfoobject.
-
getInputAudioDevice
Gets the current input device for this conference.
- Returns:
- the
AudioDeviceused by this conference as input or null if
there is currently no soundcard configured (depending on the state of the
conference)
-
setInputAudioDevice
- Parameters:
audioDevice- TheAudioDevice. null does nothing.
-
getInputVolume
float getInputVolume()Retrieves the volume of a specific participant.
- Returns:
- The volume of the participant expressed in dbm0.
-
isIn
boolean isIn()For a local conference, it returns whether the local participant is enabled For
a client conference, it return whether the remote participant has left the
conference without bein removed from it.
- Returns:
- true if the local participant is in a conference, false otherwise.
-
isRecording
boolean isRecording()Gets whether the conference is currently being recorded.
- Returns:
- true if conference is being recorded, false otherwise.
-
getMe
For a local audio video conference, this function returns the participant
hosting the conference For a remote audio video conference, this function
returns the local participant of the conference.
- Returns:
- a
Participant.
-
getMicrophoneMuted
boolean getMicrophoneMuted()Retrieves the volume of a specific participant.
- Returns:
- true if the microphone is muted, false otherwise
-
setMicrophoneMuted
void setMicrophoneMuted(boolean muted) Get microphone muted state.
Note that the microphone may be disabled globally if false was given toCore#enableMic
.- Parameters:
muted- The microphone muted state
-
getOutputAudioDevice
Gets the current output device for this conference.
- Returns:
- the
AudioDeviceused by this conference as output or null if
there is currently no soundcard configured (depending on the state of the
conference)
-
setOutputAudioDevice
- Parameters:
audioDevice- TheAudioDevice. null does nothing.
-
getParticipantCount
int getParticipantCount()Get number of participants without me.
- Returns:
- the number of participants excluding me in a
Conference
-
getParticipantDeviceList
Get list of all participant devices of a conference including me if it is in.
- Returns:
- The list of participant devices of the conference.
-
getParticipantList
Get list of all participants of a conference.
warning: The returned list does not include me.- Returns:
- The list of participants of the conference.
-
getParticipants
Deprecated.Get URIs of all participants of one conference The returned bctbx_list_t
contains URIs of all participants.
That list must be freed after use and each URI must be unref with
linphone_address_unref warning: The returned list does not include me.- Returns:
- The list of the participants' address active in the conference.
deprecated: 10/07/2020 UsegetParticipantList()instead.
-
getPlayer
Gets a player associated with the conference to play a local file and stream it
to the remote peers.
- Returns:
- A
Playerobject.
-
getScreenSharingParticipant
Get the participant that is currently screen sharing.
- Returns:
- a pointer to the participant found or nullptr.
-
getScreenSharingParticipantDevice
Get the participant device that is currently screen sharing.
- Returns:
- a pointer to the participant device found or nullptr.
-
getStartTime
@Nullable long getStartTime()Get the conference start time.
- Returns:
- conference start time.
-
getState
Conference.State getState()Get the current state of the conference.
- Returns:
- the
Conference.Stateof the conference.
-
getSubject
Get the conference subject.
- Returns:
- conference subject.
-
setSubject
Set the conference subject.
- Parameters:
subject- conference subject
-
getSubjectUtf8
Get the conference subject as an UTF-8 string.
- Returns:
- conference subject.
-
setSubjectUtf8
Set the conference subject as an UTF-8 string.
- Parameters:
subject- conference subject
-
getUsername
Get the conference username.
- Returns:
- conference subject.
-
setUsername
Set the conference username.
- Parameters:
username- conference subject
-
addParticipant
Join an existing call to the conference.
If the conference is in the state LinphoneConferenceStateCreationPending, then
the conference will start on the input and output audio devices used for the
currently active call, if any- Parameters:
call- aCallthat has to be added to the conference.
warning: This function guarantees that the local endpoint is added to the
conference only if one of calls added is in state StreamsRunning. It is highly
recommended to call linphone_confererence_enter() to guarantee that the local
endpoint is added to the conference.
-
addParticipant
Join a participant to the conference.
- Parameters:
uri- aAddressthat has to be added to the conference.
warning: This function guarantees that the local endpoint is added to the
conference only if there is a call state StreamsRunning towards one of the
addresses. It is highly recommended to call linphone_confererence_enter() to
guarantee that the local endpoint is added to the conference.
-
addParticipants
Add participants to the conference, by supplying a list ofCall.
If the conference is in the state LinphoneConferenceStateCreationPending, then
the conference will start on the input and output audio devices used for the
currently active call, if any- Parameters:
calls- A list of calls to add to the conference.
-
addParticipants
- Parameters:
addresses- A list of calls to add to the conference.
-
enter
int enter()For a local conference, the local participant joins the conference For a client
conference, the participant rejoins the conference after leaving it earlier on.
- Returns:
- 0 if succeeded. Negative number if failed
-
findParticipant
Find a participant from a conference.
- Parameters:
uri- SIP URI of the participant to search.- Returns:
- a pointer to the participant found or nullptr.
-
getParticipantDeviceVolume
Retrieves the volume of a specific participant.
- Parameters:
device- The Participant- Returns:
- The volume of the participant expressed in dbm0.
-
inviteParticipants
Invite participants to the conference, by supplying a list ofAddress
If the conference is in the state LinphoneConferenceStateCreationPending, then
the conference will start on the input and output audio devices used for the
currently active call, if any This method will call every address supplied and
add it to a conference on devices hosting a conference.
On the other hand, if the conference is created on a server, this method will
allow to create either a chat only conference or an ad-hoc audio video
conference- Parameters:
addresses- A list of SIP addresses to invite.params-CallParamsto use for inviting the participants.
warning: TheCallParamsare only honored by conference servers and
devices that host the conference locally.
-
isMe
For a local audio video conference, this function compares the address provided
as argument with that of participant hosting the conference For a remote audio
video conference, this function compares the address provided as argument with
that of the local participant of the conference.
- Parameters:
uri- AAddressobject- Returns:
- true if the participant is me, false otherwise.
-
leave
int leave()For a local conference, the local participant leaves the conference For a
client conference, the participant leaves the conference after joining it
earlier on.
- Returns:
- 0 if succeeded. Negative number if failed
-
removeParticipant
Deprecated.- Parameters:
uri- URI of the participant to remove
warning: The passed participant uri must be one of those returned bygetParticipants()- Returns:
- 0 if succeeded, -1 if failed
deprecated: 10/07/2020 UseremoveParticipant(org.linphone.core.Address)instead.
-
removeParticipant
- Parameters:
participant- participant to remove
warning: The passed participant must be one of those returned bygetParticipantList()
warning: This method may destroy the conference if the only remaining
participant had an existing call to the local participant before the conference
was created- Returns:
- 0 if succeeded, -1 if failed
-
removeParticipant
Deprecated.- Parameters:
call- call to remove- Returns:
- 0 if succeeded, -1 if failed
deprecated: 10/07/2020 UseremoveParticipant(org.linphone.core.Address)instead.
-
setLocalParticipantStreamCapability
Set stream capability on 'me' device of a local conference.
- Parameters:
direction- the direction of stream of type stream_typestreamType- AStreamType
-
setParticipantAdminStatus
Change the admin status of a participant of a conference (you need to be an
admin yourself to do this).
- Parameters:
participant- The Participant for which to change the admin statusisAdmin- A boolean value telling whether the participant should now be an
admin or not
-
startRecording
Starts recording the conference.
- Parameters:
path- Where to record the conference- Returns:
- 0 if succeeded. Negative number in case of failure.
-
stopRecording
int stopRecording()Stops the conference recording.
- Returns:
- 0 if succeeded. Negative number in case of failure.
-
terminate
int terminate()Terminates conference.
- Returns:
- 0 if the termination is successful, -1 otherwise.
-
updateParams
Update parameters of the conference.
This is typically used enable or disable the video stream in the conference.- Parameters:
params- the new parameters to apply.
-
stateToString
-
addListener
-
removeListener
-
setUserData
Sets the object to store in this object user's data- Parameters:
data- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-