Skip to content

设置镜像模式

注意

该方法回调为异步事件,请参考方法事件

方法名

setMirrorType

用法

js
if (this.mirrorType == "NONE") {
  this.mirrorType = "HORIZONTAL";
} else if (this.mirrorType == "HORIZONTAL") {
  this.mirrorType = "VERTICAL";
} else {
  this.mirrorType = "NONE";
}
this.$refs.refPlayer.setMirrorType({
  mirrorType: this.mirrorType
})
js
if (mirrorType.value == "NONE") {
  mirrorType.value = "HORIZONTAL";
} else if (mirrorType.value == "HORIZONTAL") {
  mirrorType.value = "VERTICAL";
} else {
  mirrorType.value = "NONE";
}
let options = {
  mirrorType: mirrorType.value
}
let params = JSONObject.parse(JSON.stringify(options)) as JSONObject
refPlayer.value?.setMirrorType(params)

参数说明

参数名参数类型是否必填默认值参数描述
mirrorTypeString视图镜像模式,可选值:
NONE:无镜像
HORIZONTAL:水平镜像
VERTICAL:垂直镜像