@@ -78,8 +78,8 @@ This JSON file contains two attributes: **MetaData** and **Channels**.
-**Channels** provides information about the vibration channel. It is a JSON array that holds information about each channel. It contains two attributes: **Parameters** and **Pattern**.
-**Parameters** provides parameters related to the channel. Under it, **Index** indicates the channel ID. The value is fixed at **1** for a single channel. This parameter is mandatory.
-**Pattern** indicates the vibration sequence. It is a JSON array. Under it, **Event** indicates a vibration event, which can be either of the following types:
-**transient**: short vibration
-**continuous**: long vibration
-**transient**: short vibration
-**continuous**: long vibration
The table below describes the parameters under **Event**.
...
...
@@ -105,170 +105,161 @@ The following requirements must be met:
2. Start vibration with the specified effect and attribute.
```js
```ts
importvibratorfrom'@ohos.vibrator';
try{
vibrator.startVibration({// To use startVibration, you must configure the ohos.permission.VIBRATE permission.
@@ -489,7 +497,7 @@ Describes the vibration with a preset effect.
## VibrateFromFile<sup>10+</sup>
Describes the custom vibration type, which is supported only by certain devices.
Describes the custom vibration type, which is supported only by certain devices. If a device does not support this vibration type, [an error code indicating unsupported device](../errorcodes/errorcode-universal.md) is returned.