更新时间:2026-09-14 GMT+08:00
设置画质方法2
方法名称
void setResProfile(Profile profile)
功能描述
设置云手机的画质。Profile 内参数的优先级:level > width > height.
- 如果设置了level,按level匹配处理云机画质档位;
- 如果没有设置level(值为null),且设置了width,按width距离计算就近的云机画质档位;
- 如果没有设置level(值为null),width(值为null),且设置了height,按height距离计算就近的云机画质档位。
width和height与分辨率的对应关系:例如1080p画质档位,分辨率为1080x1920,此时width对应于1920,height对应于1080。
另外,参数设置匹配时,还需考虑端侧硬件支持的档位限制。
参数说明
Profile 对象结构:
| 字段名 | 类型 | 说明 |
|---|---|---|
| level | Integer | 画质档位
|
| width | Integer | 分辨率宽度 |
| height | Integer | 分辨率高度 |
返回值
boolean,设置成功返回true,设置失败返回false。
调用示例
Profile profile = new Profile();
profile.setHeight(1080); // 设置1080p分辨率
CloudPhoneClient.setResProfile(profile); 父主题: 设置画质