com.supermap.ai.mediaservice
Class MediaService
- java.lang.Object
-
- com.supermap.ai.mediaservice.MediaService
-
public class MediaService extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description MediaService(android.content.Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description CameraView
createLocalRenderView()
Creates local videosvoid
muteLocalAudioStream(boolean muted)
Whether to mutevoid
pausePushRenderView()
Stops posting the camera viewvoid
setPlayerService(java.lang.String url)
Sets the pull-flow addressvoid
setPushService(java.lang.String ip, java.lang.String port, java.lang.String id, InitCallback callback)
Sets the push-flow service addressvoid
startPlay(java.lang.String Key, android.view.TextureView textureView)
Starts to pull flowvoid
startPushCameraView()
Starts to post the camera viewvoid
startPushCustom(android.graphics.Bitmap bitmap)
Begins to post custom content video flowvoid
stopPlay()
Stops pulling flowvoid
stopPushCustom()
Stops to push flow
-
-
-
Constructor Detail
-
MediaService
public MediaService(android.content.Context context)
- Parameters:
context
-
-
-
Method Detail
-
setPushService
public void setPushService(java.lang.String ip, java.lang.String port, java.lang.String id, InitCallback callback)
Sets the push-flow service address- Parameters:
ip
- ip address of rtsp serverport
- the port of rtsp server.id
- id name of plug flowcallback
-
-
startPushCameraView
public void startPushCameraView()
Starts to post the camera view
-
pausePushRenderView
public void pausePushRenderView()
Stops posting the camera view
-
startPushCustom
public void startPushCustom(android.graphics.Bitmap bitmap)
Begins to post custom content video flow- Parameters:
bitmap
- plug flow image
-
muteLocalAudioStream
public void muteLocalAudioStream(boolean muted)
Whether to mute- Parameters:
muted
-
-
stopPushCustom
public void stopPushCustom()
Stops to push flow
-
setPlayerService
public void setPlayerService(java.lang.String url)
Sets the pull-flow address- Parameters:
url
-
-
startPlay
public void startPlay(java.lang.String Key, android.view.TextureView textureView)
Starts to pull flow- Parameters:
Key
-textureView
-
-
stopPlay
public void stopPlay()
Stops pulling flow
-
createLocalRenderView
public CameraView createLocalRenderView()
Creates local videos- Returns:
- camera
-
-