| expandScreen | Array<number> | Yes | IDs of the expanded screens. |
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the expanded mode is stopped, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Display Error Codes](../errorcodes/errorcode-display.md).
| ID| Error Message|
| ------- | ----------------------- |
| 1400001 | Invalid display or screen. |
**Example**
```js
try{
letexpandScreenIds=[1,2,3];
screen.stopExpand(expandScreenIds,(err)=>{
if(err.code){
console.error('Failed to stop expand screens. Code:'+JSON.stringify(err));
return;
}
console.info('Succeeded in stopping expand screens.');
});
}catch(exception){
console.error('Failed to stop expand screens. Code: '+JSON.stringify(exception));
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If screen mirroring is stopped, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes**
For details about the error codes, see [Display Error Codes](../errorcodes/errorcode-display.md).
| ID| Error Message|
| ------- | ----------------------- |
| 1400001 | Invalid display or screen. |
**Example**
```js
try{
letmirrorScreenIds=[1,2,3];
screen.stopMirror(mirrorScreenIds,(err)=>{
if(err.code){
console.error('Failed to stop mirror screens. Code:'+JSON.stringify(err));
return;
}
console.info('Succeeded in stopping mirror screens.');
});
}catch(exception){
console.error('Failed to stop mirror screens. Code: '+JSON.stringify(exception));
@@ -744,7 +910,7 @@ Before calling any API in **Screen**, you must use **[getAllScreens()](#screenge
| id | number | Yes | No | Screen ID. |
| parent | number | Yes | No | ID of the group to which a screen belongs. |
| supportedModeInfo | Array<[ScreenModeInfo](#screenmodeinfo)> | Yes | No | Mode set supported by the screen. |
| activeModeIndex | number | Yes | No | Index of the active screen mode.|
| activeModeIndex | number | Yes | No | Index of the active screen mode. The current value and value range of this parameter vary according to the screen resolution, refresh rate, and device hardware.|
| modeIndex | number | Yes | Index of the mode to set. |
| modeIndex | number | Yes | Index of the mode to set. The current value and value range of this parameter vary according to the screen resolution, refresh rate, and device hardware.|
| callback | AsyncCallback<void> | Yes | Callback used to return the result. If the active mode is successfully set, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes**
...
...
@@ -874,7 +1040,7 @@ Sets the active mode of the screen. This API uses a promise to return the result
| Name | Type | Mandatory| Description |
| --------- | ------ | ---- | ---------- |
| modeIndex | number | Yes | Index of the mode to set.|
| modeIndex | number | Yes | Index of the mode to set. The current value and value range of this parameter vary according to the screen resolution, refresh rate, and device hardware.|