扫一扫咨询方案
更新时间 : 2026-03-23 16:45:30
vesdk.har"dependencies": {
"vesdk": "file:./libs/vesdk.har"
}
在使用编辑功能前,中先注册License
SXVideo.initLicense("your license");
xcomponentController: XComponentController = new XComponentController()
XComponent({
id: 'xcomponentId',
type: 'surface',
controller: this.xcomponentController
})
.onLoad((xComponentContext) => {
SXVideo.initLicense(this.license);
copyRawFile(getContext(this) as common.UIAbilityContext)
})
.onDestroy(() => {
console.log('onDestroy');
})
.id("xcomponent")
//创建SXEditManager
let options: SXEditOptions = new SXEditOptions(this.xcomponentController.getXComponentSurfaceRect().surfaceWidth, this.xcomponentController.getXComponentSurfaceRect().surfaceHeight, 25);
if (options != null) {
options.setFontFile("/system/fonts/NotoSansCJK-Regular.ttc");
this.manager = SXEditManager.create(options);
//将manager与输出surface绑定
this.manager.attachToXComponent(this.xcomponentController.getXComponentSurfaceId());
}

vesdk.har"dependencies": {
"vesdk": "file:./libs/vesdk.har"
}
在使用编辑功能前,中先注册License
SXVideo.initLicense("your license");
xcomponentController: XComponentController = new XComponentController()
XComponent({
id: 'xcomponentId',
type: 'surface',
controller: this.xcomponentController
})
.onLoad((xComponentContext) => {
SXVideo.initLicense(this.license);
copyRawFile(getContext(this) as common.UIAbilityContext)
})
.onDestroy(() => {
console.log('onDestroy');
})
.id("xcomponent")
//创建SXEditManager
let options: SXEditOptions = new SXEditOptions(this.xcomponentController.getXComponentSurfaceRect().surfaceWidth, this.xcomponentController.getXComponentSurfaceRect().surfaceHeight, 25);
if (options != null) {
options.setFontFile("/system/fonts/NotoSansCJK-Regular.ttc");
this.manager = SXEditManager.create(options);
//将manager与输出surface绑定
this.manager.attachToXComponent(this.xcomponentController.getXComponentSurfaceId());
}