public class Conference extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Conference.AudioCodec
Audio codec available
|
static class |
Conference.AudioOption
Audio options
|
static class |
Conference.ErrorEvent |
static class |
Conference.GeneralOption
General options
|
static interface |
Conference.Listener
Conference event listener
|
static interface |
Conference.Member
Room member.
|
static class |
Conference.Presence
User presence
|
static class |
Conference.RoomEvent
Room event
|
static class |
Conference.Status
Connection status
|
static class |
Conference.VideoOption
Video options
|
Modifier and Type | Field and Description |
---|---|
static int |
CALL_ERROR |
static int |
CONF_EVENT |
static int |
CONNECTION_EVENT |
static int |
ROOM_MEMBERS |
Modifier and Type | Method and Description |
---|---|
void |
addListener(Conference.Listener listener)
Add a bistri conference listener.
|
void |
call(String peerId,
String roomName)
Start a call with a remote user.
|
void |
connect()
Connect to bistri conference service.
|
void |
disconnect()
Disconnect.
|
Conference.AudioCodec |
getAudioOption_AudioCodec(Conference.AudioOption option)
Get audio option has AudioCodec enum.
|
int |
getAudioOption_int(Conference.AudioOption option)
Get audio option has integer.
|
String |
getAudioOption_string(Conference.AudioOption option)
Get audio option has String.
|
int |
getCameraId()
Get the current camera index.
|
ArrayList<android.hardware.Camera.CameraInfo> |
getCameraInfos()
Get information about available cameras.
|
int |
getCameraNb()
Get the number of available camera.
|
android.content.Context |
getContext()
Return the application context that has been set with getInstance.
|
String |
getGeneralOption_String(Conference.GeneralOption option)
Get general option has String.
|
static Conference |
getInstance()
Get the current instance of bistri conference object.
|
static Conference |
getInstance(android.content.Context context)
Get the instance of bistri conference object.
|
android.view.SurfaceView |
getLocalRender() |
PeerStream |
getLocalStream()
Return the local peer stream.
|
void |
getMembers(String roomName)
Get members of a room.
|
String[] |
getPeerStream_Ids()
Return an identifiers array of peers currently in the room.
|
PeerStream |
getPeerStream(String peerId)
Return a peer stream from peer ID.
|
void |
getPresence(String remoteUserId)
Get presence of a remote peer.
|
String |
getRoomName()
Return the current room name.
|
Conference.Status |
getStatus()
Get the connection status.
|
String |
getUserId()
Get your own user identifier.
|
int |
getVideoOption_int(Conference.VideoOption option)
Get video option has int.
|
String |
getVideoOption_string(Conference.VideoOption option)
Get video option has String.
|
boolean |
hasAudioOption(Conference.AudioOption option)
Check if an audio option has been set.
|
boolean |
hasGeneralOption(Conference.GeneralOption option)
Check if a general option has been set.
|
boolean |
hasVideoOption(Conference.VideoOption option)
Check if a video option has been set.
|
void |
join(String roomName)
Join a room.
|
void |
join(String roomName,
int roomMaxCapacity)
Join a room without user name.
|
void |
leave(String room)
Leave the current room.
|
void |
openDataChannel(String peerId,
String label,
String roomName)
open data stream
|
void |
removeListener(Conference.Listener listener)
Remove a bistri conference listener.
|
void |
setAudioOption(Conference.AudioOption option,
Conference.AudioCodec value)
Set audio options.
|
void |
setAudioOption(Conference.AudioOption option,
int value)
Set audio options.
|
void |
setCameraId(int id)
Check if a room is joined
|
void |
setGeneralOption(Conference.GeneralOption option,
String value)
Set a general option.
|
boolean |
setInfo(String appId,
String appKey)
Set credential information.
|
boolean |
setInfo(String appId,
String appKey,
String userName)
Set credential information.
|
boolean |
setInfo(String appId,
String appKey,
String userName,
String userId)
Set credential information.
|
void |
setLoudspeaker(boolean enable)
Enable/disable loud speaker.
|
void |
setPresence(Conference.Presence presence)
Set your own presence.
|
void |
setVideoOption(Conference.VideoOption option,
int value)
Set video options.
|
void |
setView(String room,
String peer_id,
android.view.SurfaceView view)
Set video render view.
|
public static final int CONNECTION_EVENT
public static final int CALL_ERROR
public static final int CONF_EVENT
public static final int ROOM_MEMBERS
public android.view.SurfaceView getLocalRender()
public int getCameraNb()
// Usage
int nbCamera = bistriConference.getCameraNb();
public ArrayList<android.hardware.Camera.CameraInfo> getCameraInfos()
// Usage
ArrayList<CameraInfo> cameraInfoList = bistriConference.getCameraInfos();
public static Conference getInstance(android.content.Context context)
// Usage
Conference bistriConference = Conference.getInstance( getApplicationContext() );
context
- (android.content.Context) Application context.public static Conference getInstance()
public boolean setInfo(String appId, String appKey)
// Usage
bistriConference.setInfo( "36846eab", "4c304359baa6d0bd1f9106aaeb215f22" );
appId
- (String) Your application IdentifierappKey
- (String) Your application Keypublic boolean setInfo(String appId, String appKey, String userName)
// Usage
bistriConference.setInfo( "36846eab", "4c304359baa6d0bd1f9106aaeb215f22", userName );
appId
- (String) Your application IdentifierappKey
- (String) Your application KeyuserName
- (String) User namepublic boolean setInfo(String appId, String appKey, String userName, String userId)
// Usage
bistriConference.setInfo( "36846eab", "4c304359baa6d0bd1f9106aaeb215f22", userName );
appId
- (String) Your application IdentifierappKey
- (String) Your application KeyuserName
- (String) User nameuserId
- (String) User identifierpublic void addListener(Conference.Listener listener)
// Usage
bistriConference.addListener( myListener );
listener
- (bistri.conference.Listener)public void removeListener(Conference.Listener listener)
// Usage
bistriConference.removeListener( myListener );
listener
- (bistri.conference.Listener)public void connect()
// Usage
bistriConference.connect();
public void disconnect()
// Usage
bistriConference.disconnect();
public Conference.Status getStatus()
// Usage
bistriConference.getState();
public void join(String roomName)
// Usage
bistriConference.join( "MyRoomName" );
roomName
- The room name you want to join. It can be an existing one, or a new one. Room name can contains only a-z,A-Z,0-9,-,_public void call(String peerId, String roomName)
// Usage
bistriConference.call( peerId, "MyCallingRoom" );
peerId
- (String) peer identifier.roomName
- (String) The room where the call take place. Room name can contains only a-z,A-Z,0-9,-,_public void openDataChannel(String peerId, String label, String roomName)
// Usage
bistriConference.openDataStream( peerId, "MyDataChannel", "MyCallingRoom" );
peerId
- (String) peer identifier.label
- (String) data stream label.roomName
- (String) The room where the call take place. Room name can contains only a-z,A-Z,0-9,-,_public void join(String roomName, int roomMaxCapacity)
// Usage
bistriConference.join( "MyRoomName", 4 );
roomName
- The room name you want to join. It can be an existing one, or a new one. Room name can contains only a-z,A-Z,0-9,-,_roomMaxCapacity
- The room maximum number of participants in a room by using the roomMaxCapacity parameter. Only the first person joining the room can set the limitation. By default the maximum number of participants is limited to 256public void leave(String room)
// Usage
bistriConference.leave();
room
- (String) room namepublic void setCameraId(int id)
// Usage
bistriConference.setCameraId( facingBackCameraIndex );
id
- (int) camera identifier. Also the camera index of getCameraInfos().public int getCameraId()
// Usage
int index = bistriConference.getCameraId();
public String getRoomName()
// Usage
String roomName = bistriConference.getRoomName();
public void setView(String room, String peer_id, android.view.SurfaceView view)
// Usage
String roomName = bistriConference.setView(peer_id, view);
room
- (String) room namepeer_id
- (String) peer identifierview
- (SurfaceView) SurfaceView where video is renderedpublic android.content.Context getContext()
// Usage
Context ctx = bistriConference.getContext();
public PeerStream getLocalStream()
// Usage
PeerStream localPeer = bistriConference.getLocalStream();
public PeerStream getPeerStream(String peerId)
// Usage
PeerStream peer = bistriConference.getPeerStream( remotePeerId );
peerId
- (String) peer identifierpublic String[] getPeerStream_Ids()
// Usage
Context ctx = bistriConference.getPeerStream_Ids();
public void setGeneralOption(Conference.GeneralOption option, String value)
// Usage
bistriConference.setGeneralOption( GeneralOption.GL_RENDERER, CustomGLRenderer.class.getName() );
option
- (Conference.GeneralOption)value
- (String) option valuepublic boolean hasGeneralOption(Conference.GeneralOption option)
// Usage
bistriConference.hasGeneralOption( GeneralOption.GL_RENDERER );
option
- (Conference.GeneralOption)public String getGeneralOption_String(Conference.GeneralOption option)
// Usage
bistriConference.getGeneralOption_String( GeneralOption.GL_RENDERER );
option
- (Conference.GeneralOption)public void setVideoOption(Conference.VideoOption option, int value)
// Usage
bistriConference.setVideoOption( VideoOption.MAX_HEIGHT, 480 );
option
- (Conference.GeneralOption)value
- (int)public boolean hasVideoOption(Conference.VideoOption option)
// Usage
bistriConference.hasVideoOption( VideoOption.MAX_HEIGHT );
option
- (Conference.VideoOption)public int getVideoOption_int(Conference.VideoOption option)
// Usage
bistriConference.getVideoOption_int( VideoOption.MAX_HEIGHT );
option
- (Conference.VideoOption)public String getVideoOption_string(Conference.VideoOption option)
// Usage
bistriConference.getGeneralOption_String( VideoOption.MAX_HEIGHT );
option
- (Conference.VideoOption)public void setAudioOption(Conference.AudioOption option, Conference.AudioCodec value)
// Usage
bistriConference.setAudioOption( AudioOption.PREFERRED_CODEC, AudioCodec.ISAC );
option
- (Conference.AudioOption)value
- (Conference.AudioCodec)public void setAudioOption(Conference.AudioOption option, int value)
// Usage
bistriConference.setAudioOption( AudioOption.PREFERRED_CODEC_CLOCKRATE, 16000 );
option
- (Conference.AudioOption)value
- (int)public boolean hasAudioOption(Conference.AudioOption option)
// Usage
bistriConference.hasAudioOption( AudioOption.PREFERRED_CODEC );
option
- (Conference.AudioOption)public int getAudioOption_int(Conference.AudioOption option)
// Usage
int clockrate = bistriConference.getAudioOption_int( AudioOption.PREFERRED_CODEC_CLOCKRATE );
option
- (Conference.AudioOption)public Conference.AudioCodec getAudioOption_AudioCodec(Conference.AudioOption option)
// Usage
AudioCodec codec = bistriConference.getAudioOption_AudioCodec( AudioOption.PREFERRED_CODEC );
option
- (Conference.AudioOption)public String getAudioOption_string(Conference.AudioOption option)
// Usage
String codec_name = bistriConference.getAudioOption_string( AudioOption.PREFERRED_CODEC );
option
- (Conference.AudioOption)public void setLoudspeaker(boolean enable)
// Usage
bistriConference.setLoudspeaker( false );
enable
- (boolean)public String getUserId()
// Usage
String myOwnUserId = bistriConference.getUserId();
public void setPresence(Conference.Presence presence)
// Usage
bistriConference.setPresence( Presence.AWAY );
presence
- (Presence)Conference.Presence
public void getPresence(String remoteUserId)
// Usage
bistriConference.getPresence( remotePeerId );
remoteUserId
- (String) remote user identifierfor response
public void getMembers(String roomName)
// Usage
bistriConference.getMembers( myRoomName );
roomName
- (String) The room namefor response?
Copyright © 2015. All rights reserved.