目录

ImageRenderImpl

Class Info

public class ImageRenderImpl implements ImageRenderInterface

ImageRender implementation class.

Public Constructor Summary

Constructor Name

ImageRenderImpl(ImageRender.RenderCallBack callback)

Constructor of an ImageRenderImpl instance.

Public Method Summary

Qualifier and Type

Method Name and Description

int

doInit(java.lang.String sourcePath, org.json.JSONObject authJson)

Initializes the Image Render service.

RenderView

getRenderView()

Parses the configuration scripts and resource files and returns the rendered views. This method works in synchronous mode.

RenderView

getRenderView(IParseCallBack callBack)

Parses the configuration scripts and resource files and returns the rendered views. When the script parsing is complete, the onParseEnd callback method of IParseCallBack is called. This method works in asynchronous mode.

int

playAnimation()

Plays animations.

int

pauseAnimation(boolean isEnable)

Pauses animations.

int

resumeAnimation()

Resumes animations.

int

stopAnimation()

Stops animations.

int

removeRenderView()

Removes rendered views and destroys resources.

RenderObject

setKeyValueInfo(java.lang.String key, java.lang.Object... value)

Sets parameters and their values.

int

startRecord(org.json.JSONObject json, IStreamCallBack callback)

Starts video or GIF image recording.

int

stopRecord()

Stops video or GIF image recording.

int

startRecord(org.json.JSONObject json, IStreamCallBack callback)

Starts GIF image recording.

int

stopRecord()

Stops GIF image recording.

int

unBindRenderView(java.lang.String hashCode)

Unbinds a rendered view.

int

bindRenderView(java.lang.String sourcePath, org.json.JSONObject authJson, IBindCallBack iBindCallBack)

Binds a rendered view.

Methods Inherited from Class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Public Constructors

[h2]ImageRenderImpl

Constructor

public ImageRenderImpl(ImageRender.RenderCallBack callback)

Constructor of an ImageRenderImpl instance.

Public Methods

[h2]doInit

Method

public int doInit(java.lang.String sourcePath, org.json.JSONObject authJson)

Initializes the Image Render service.

Parameters

Name

Description

sourcePath

Path to the source file.

authJson

Authentication information in JSON format.

Returns

Type

Description

int

Initialization result.

[h2]getRenderView()

Method

public RenderView getRenderView()

Parses the configuration scripts and resource files and returns the rendered views. This method works in synchronous mode.

Returns

Type

Description

RenderView

Rendered view instance.

[h2]getRenderView(IParseCallBack callBack)

Method

public RenderView getRenderView(IParseCallBack callBack)

Parses the configuration scripts and resource files and returns the rendered views. When the script parsing is complete, the onParseEnd callback method of IParseCallBack is called. This method works in asynchronous mode.

Parameters

Name

Description

callBack

Callback for ending of script parsing.

Returns

Type

Description

RenderView

Rendered view instance.

[h2]playAnimation

Method

public int playAnimation()

Plays animations.

Returns

Type

Description

int

Animation play result.

[h2]pauseAnimation

Method

public int pauseAnimation(boolean isEnable)

Pauses animations.

Parameters

Name

Description

isEnable

Indicates whether to play the paused animation. A paused animation can be set by the name parameter of a basic animation. If the value is true, the paused animation is played. If the value is false, the paused animation is not played.

Returns

Type

Description

int

Animation pause result.

[h2]resumeAnimation

Method

public int resumeAnimation()

Resumes animations.

Returns

Type

Description

int

Animation resume result.

[h2]stopAnimation

Method

public int stopAnimation()

Stops animations.

Returns

Type

Description

int

Animation stop result.

[h2]removeRenderView

Method

public int removeRenderView()

Removes rendered views and destroys resources.

Returns

[h2]setKeyValueInfo

Method

public RenderObject setKeyValueInfo(java.lang.String key, java.lang.Object... value)

Sets parameters and their values.

Parameters

Name

Description

key

Parameter type.

value

Parameter value. Multiple parameter values are supported. Currently, the string, int, boolean, and float types are supported if there is only one parameter, whereas only the string type is supported if there are multiple parameters.

Returns

Type

Description

RenderObject

Return result.

[h2]startRecord

Method

public int startRecord(org.json.JSONObject json, IStreamCallBack callback)

Starts video or GIF image recording.

Parameters

Name

Description

json

JSON string of the record type, compression rate, and frame rate.

callback

Record result callback API.

Returns

Type

Description

int

Recording start result.

[h2]stopRecord

Method

public int stopRecord()

Stops video or GIF image recording.

Returns

Type

Description

int

Recording stop result.

[h2]unBindRenderView

Method

public int unBindRenderView(java.lang.String hashCode)

Unbinds a rendered view.

Parameters

Name

Description

hashCode

Hash code of the rendered view.

Returns

Type

Description

int

Unbinding result.

[h2]bindRenderView

Method

public int bindRenderView(java.lang.String sourcePath, org.json.JSONObject authJson, IBindCallBack iBindCallBack)

Binds a rendered view.

Parameters

Name

Description

sourcePath

Path to the source file.

authJson

Authentication information in JSON format.

iBindCallBack

Callback for rendered view binding.

Returns

Type

Description

int

Binding result.