目录

ImageRenderInterface

Interface Info

public interface ImageRenderInterface

Implements the Image Render service.

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

pauseAnimation(boolean isEnable)

Pauses animations.

int

resumeAnimation()

Resumes animations.

int

playAnimation()

Plays 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

stopAnimation()

Stops animations.

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.

Public Methods

[h2]doInit

Method

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

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

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

int playAnimation()

Plays animations.

Returns

Type

Description

int

Animation play result.

[h2]pauseAnimation

Method

int pauseAnimation(boolean isEnable)

Pauses an animation.

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

int resumeAnimation()

Resumes animations.

Returns

Type

Description

int

Animation resume result.

[h2]stopAnimation

Method

int stopAnimation()

Stops animations.

Returns

Type

Description

int

Animation stop result.

[h2]removeRenderView

Method

int removeRenderView()

Removes rendered views and destroys resources.

Returns

[h2]setKeyValueInfo

Method

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

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

int stopRecord()

Stops video or GIF image recording.

Returns

Type

Description

int

Recording stop result.

[h2]unBindRenderView

Method

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

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.