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 CameraViewcreateLocalRenderView()Creates local videosvoidmuteLocalAudioStream(boolean muted)Whether to mutevoidpausePushRenderView()Stops posting the camera viewvoidsetPlayerService(java.lang.String url)Sets the pull-flow addressvoidsetPushService(java.lang.String ip, java.lang.String port, java.lang.String id, InitCallback callback)Sets the push-flow service addressvoidstartPlay(java.lang.String Key, android.view.TextureView textureView)Starts to pull flowvoidstartPushCameraView()Starts to post the camera viewvoidstartPushCustom(android.graphics.Bitmap bitmap)Begins to post custom content video flowvoidstopPlay()Stops pulling flowvoidstopPushCustom()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
-
-