如果有多个页面播放视频,都用的是
XComponent({
id: this.playerIndex.toString(),
type: XComponentType.SURFACE,
libraryname: 'premierlibrary',
controller: this.xComponentController
})
去渲染视频画面的话,要保证各个页面的Xcomponent的参数id的值是唯一的,并且
player?.setSurfaceId((idx + this.params['differentIndex']).toString())
播放器绑定的surfaceId要和XComponent的参数id保持一致.