public class EZPlayer
extends java.lang.Object
Constructor and Description |
---|
EZPlayer() |
EZPlayer(EZStreamParamHelp paramHelp)
Use this constructor when the camera is in live view, playback or two-way audio, and create player by EZOpenSDK.CreatePlayer.
|
Modifier and Type | Method and Description |
---|---|
Bitmap |
capturePicture()
Before enabling the capture, you should enable the live view or playback.
|
boolean |
closeSound()
Disable audio
|
void |
getLeaveMessageData(EZLeaveMessage msg,
EZOpenSDKListener.EZLeaveMessageFlowCallback leaveMessageFlowCallback)
Get the message data
|
java.util.Calendar |
getOSDTime()
Get the current playback time mark
|
boolean |
openSound()
Enable audio
|
boolean |
pausePlayback()
Pause the remote playback
|
void |
release() |
boolean |
resumePlayback()
Start remote playback
|
boolean |
seekPlayback(java.util.Calendar offsetTime)
Playback according to the DST bias
Drag the process bar to call this interface.Stop playing, and then set the offsetTime as the start time to playback by time.
Adopt stopPlayback+startPlayback(offsetTime,stopTime) to replace this interface is suggested.
|
void |
setDisplayRegion(boolean enable,
CustomRect original,
CustomRect current)
Digital zoom, it is used to zoom the video.
|
boolean |
setHandler(Handler handler)
Set the Handler, this handler is used to transmit messages from player to handler.
|
void |
setLeaveMessageFlowCallback(EZOpenSDKListener.EZLeaveMessageFlowCallback leaveMessageFlowCallback)
Set message downloading callback
|
void |
setPlayVerifyCode(java.lang.String verifyCode)
Input the encryption password to decode the encryption video. This interface can be called when the error callback of ERROR_INNER_VERIFYCODE_NEED or ERROR_INNER_VERIFYCODE_ERROR has been received.
|
boolean |
setSurfaceHold(SurfaceHolder sh)
Set the display interface of the player.
|
void |
setVoiceTalkStatus(boolean pressed)
Set the two-way audio status when in half-duplex two-way audio.
|
boolean |
startLocalRecord(EZOpenSDKListener.EZStandardFlowCallback standardFlowCallback)
Live view/playback
|
boolean |
startLocalRecordWithFile(java.lang.String recordFile)
Start local recording with live view stream
|
boolean |
startPlayback(java.util.Calendar startTime,
java.util.Calendar stopTime)
Start the remote playback of SD card---playback by time.
|
boolean |
startPlayback(EZCloudRecordFile cloudFile)
Start the remote playback of cloud storage
|
boolean |
startPlayback(EZDeviceRecordFile deviceFile)
Start the remote playback of SD card
|
boolean |
startRealPlay()
Start live view
|
boolean |
startVoiceTalk()
Start two-way audio
|
boolean |
stopLocalRecord()
Stop local recording with live view stream.
|
boolean |
stopPlayback()
Stop remote playback
|
boolean |
stopRealPlay()
Stop live view
|
boolean |
stopVoiceTalk()
Stop two-way audio
|
public EZPlayer(EZStreamParamHelp paramHelp)
paramHelp
- public EZPlayer()
public void release()
public boolean setSurfaceHold(SurfaceHolder sh)
sh
- The display interface used to playpublic boolean setHandler(Handler handler)
handler
- The handler used to handle the messagespublic void setPlayVerifyCode(java.lang.String verifyCode)
verifyCode
- The default video encryption password is the six verification codes of the device.public boolean startRealPlay()
public boolean stopRealPlay()
public Bitmap capturePicture()
public boolean openSound()
public boolean closeSound()
public java.util.Calendar getOSDTime()
public boolean startVoiceTalk()
public boolean stopVoiceTalk()
public void setVoiceTalkStatus(boolean pressed)
pressed:true- speak only
- false- listen onlypublic boolean startLocalRecordWithFile(java.lang.String recordFile)
public boolean startLocalRecord(EZOpenSDKListener.EZStandardFlowCallback standardFlowCallback)
standardFlowCallback
- Standard stream callbackpublic boolean stopLocalRecord()
public boolean startPlayback(EZCloudRecordFile cloudFile)
cloudFile
- File information of cloud storagepublic boolean startPlayback(EZDeviceRecordFile deviceFile)
deviceFile
- File information of SD cardpublic boolean startPlayback(java.util.Calendar startTime, java.util.Calendar stopTime)
startTime
- Start timestopTime
- End timepublic boolean stopPlayback()
public boolean pausePlayback()
public boolean resumePlayback()
public boolean seekPlayback(java.util.Calendar offsetTime)
offsetTime
- Record DST biaspublic void setDisplayRegion(boolean enable, CustomRect original, CustomRect current) throws PlaySDKException, InnerException
enable
- Enable/Disable digital zoomoriginal
- Region before zoomingcurrent
- Region needs to be zoomedPlaySDKException
InnerException
public void getLeaveMessageData(EZLeaveMessage msg, EZOpenSDKListener.EZLeaveMessageFlowCallback leaveMessageFlowCallback)
msg
- Message informationleaveMessageFlowCallback
- Stream callbackpublic void setLeaveMessageFlowCallback(EZOpenSDKListener.EZLeaveMessageFlowCallback leaveMessageFlowCallback)
leaveMessageFlowCallback
-Callback