Contact us

tel:15797766463

mail:business@seeshiontech.com

中文
English
中文
登录/注册

{user.username}

ID: {user.id}

<span><a href="/docs/index.html">首页</a> > <a href="/docs/en-us/editor/group_123.html">SDK</a> > <a href="/docs/en-us/editor/group_130.html">Android SDK</a> > SXEditManager</span>

SXEditManager

Update time : 2020-08-17 10:44:34

SXEditManager will manage all resources such as creating or deleting track or track group, and will manage previewing and rendering. Each instance object manages only the resources it generates, which will take up a lot of memory. And we do recommend you create one instance at the same time.

    /**  Edit width, 720 by default. */
    public int width = 720;

    /** Edit height, 1280 by default. */
    public int height = 1280;

    /** * FPS, 20 by default. */
    public int fps = 20;

    /** The license to be verified. */
    public String license = null;

    /**
     * Rendering scale percentage.
     */
    public SXPreviewScale scale = SXPreviewScale.Scale100;

    /** The path of default text font.  */
    public String fontFile = null;

    /** Enable preloading footage or not, disable it by default. */
    public boolean enableSourceManager = false;

    /** The reserved memory of pre-loading footage is 300M by default with bytes unit. */
    public long cacheSize = 300 * 1024 * 1024;
/**
 * Set background color. 
 *
 * @param color refers to the background color value.  
 */
public void setBackgroundColor(@ColorInt int color)

/**
 * Set background color. 
 *
 * @param red Red channel with the range of [0..1]
 * @param green Green channel with the range of [0..1]
 * @param blue  Blue channel with the range of [0..1]. 
 */
public void setBackgroundColor(float red, float green, float blue)

/**
 * Setting the background image or video  will cover the default background color. 
 *
 * @param resourcePath Resource path.  
 * @return error code
 */
public int setBackground(String resourcePath)

/**
 * Remove video or image background. 
 */
public void removeBackground()
/**
 * Find the track at  (x, y)  coordinate. 
 *
 * @return Return track object if found, otherwise return nullptr.  
 */
public SXTrack hitPoint(float x, float y)

/**
 * Find the track type at the point of (x, y).  
 *
 * @param type Multiple types can be found simultaneously, and connected with  “|” . 
 * @return Return track object if find the track at (x, y)  coordinate, otherwise return nullptr. 
 */
public SXTrack hitPoint(float x, float y, @SXTrack.SXTrackType int type)
/**
 * Get preview SurfaceView.
 * @return Preview SurfaceView. 
 */
public SurfaceView getPlayerView()

/**
 * Start previewing.  
 *
 * @return Success or not? 
 */
public boolean start()

/**
 * Pause previewing
 */
public void pause()

/**
 * Is it playing or not?
 *
 * @return
 */
public boolean isPlaying()

/**
 * Set the playback progress. 
 * @param second Seek the playback progress. 
 */
public void seek(float second)
/**
 * Start rendering.
 *
 * @param path Render files, full  string path. 
 * @return
 */
public boolean startRender(String path)

/**
 * Cancel rendering. 
 */
public void cancelRender()
/**
 * Release all edit resources. 
 */
public void release()