Appearance
设置旋转角度
注意
该方法回调为异步事件,请参考方法事件
方法名
setRotation
用法
js
if (this.rotation == "DEGREE_0") {
this.rotation = "DEGREE_90";
} else if (this.rotation == "DEGREE_90") {
this.rotation = "DEGREE_180";
} else if (this.rotation == "DEGREE_180") {
this.rotation = "DEGREE_270";
} else {
this.rotation = "DEGREE_0";
}
this.$refs.refPlayer.setRotation({
rotation: this.rotation
})js
if (rotation.value == "DEGREE_0") {
rotation.value = "DEGREE_90";
} else if (rotation.value == "DEGREE_90") {
rotation.value = "DEGREE_180";
} else if (rotation.value == "DEGREE_180") {
rotation.value = "DEGREE_270";
} else {
rotation.value = "DEGREE_0";
}
let options = {
rotation: rotation.value
}
let params = JSONObject.parse(JSON.stringify(options)) as JSONObject
refPlayer.value?.setRotation(params)参数说明
| 参数名 | 参数类型 | 是否必填 | 默认值 | 参数描述 |
|---|---|---|---|---|
| rotation | String | 是 | 无 | 视图旋转角度,可选值:DEGREE_0:0 度DEGREE_90:90 度DEGREE_180:180 度DEGREE_270:270 度 |

