public interface ILiveVideoBroadcaster
Modifier and Type | Method and Description |
---|---|
void |
changeCamera()
Changes the camera,
if active camera is back camera, releases the back camera and
open the front camera, it behaves same with the front camera
|
Resolution |
getPreviewSize() |
java.util.ArrayList<Resolution> |
getPreviewSizeList() |
void |
init(android.app.Activity activity,
android.opengl.GLSurfaceView gLView)
Initializes video broadcaster
|
boolean |
isConnected() |
boolean |
isPermissionGranted()
Checks whether camera and microphone permissions are granted
|
void |
openCamera(int cameraId)
Opens camera in an another thread and render camera view on GLSurfaceView
|
void |
pause()
Pauses and releases the camera, it is safe to call this function in OnPause of the activity
|
void |
requestPermission()
Request for missiong permissions
Camera and microphone permissions are required
|
void |
setAdaptiveStreaming(boolean enable)
Set adaptive streaming enable or disable
|
void |
setDisplayOrientation()
Sets the display orientation of the camera for portrait or landscape orientation
|
void |
setResolution(Resolution size)
Set the resolution of the active camera
|
boolean |
startBroadcasting(java.lang.String url)
Starts broadcasting the specified url
|
void |
stopBroadcasting()
Stops broadcastings to the server
|
void init(android.app.Activity activity, android.opengl.GLSurfaceView gLView)
activity
- the activity which is using this servicemGLView
- the GLSurfaceView which is used to render camera viewboolean isPermissionGranted()
void requestPermission()
void openCamera(int cameraId)
cameraId
- specifies which camera to open
can be
Camera.CameraInfo.CAMERA_FACING_BACK, Camera.CameraInfo.CAMERA_FACING_FRONT;void changeCamera()
void setAdaptiveStreaming(boolean enable)
enable,
- if true , adaptive streaming is enabled, defaults falsevoid setResolution(Resolution size)
size
- java.util.ArrayList<Resolution> getPreviewSizeList()
Resolution getPreviewSize()
void setDisplayOrientation()
void pause()
boolean isConnected()
boolean startBroadcasting(java.lang.String url)
url
- the rtmp url which should be in form rtmp://SERVER_ADDRESS/APP_NAME/STREAM_NAMEvoid stopBroadcasting()