@gmessier/nitro-speech 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -29,6 +29,7 @@ class HapticImpact(
|
|
|
29
29
|
HapticFeedbackStyle.LIGHT -> VibrationEffect.EFFECT_TICK
|
|
30
30
|
HapticFeedbackStyle.MEDIUM -> VibrationEffect.EFFECT_CLICK
|
|
31
31
|
HapticFeedbackStyle.HEAVY -> VibrationEffect.EFFECT_HEAVY_CLICK
|
|
32
|
+
// Default to medium
|
|
32
33
|
null -> VibrationEffect.EFFECT_CLICK
|
|
33
34
|
else -> null
|
|
34
35
|
}
|
|
@@ -41,6 +42,7 @@ class HapticImpact(
|
|
|
41
42
|
HapticFeedbackStyle.LIGHT -> LegacyOneShot(durationMs = 12L, amplitude = 50)
|
|
42
43
|
HapticFeedbackStyle.MEDIUM -> LegacyOneShot(durationMs = 18L, amplitude = 100)
|
|
43
44
|
HapticFeedbackStyle.HEAVY -> LegacyOneShot(durationMs = 28L, amplitude = 180)
|
|
45
|
+
// Default to medium
|
|
44
46
|
null -> LegacyOneShot(durationMs = 18L, amplitude = 100)
|
|
45
47
|
else -> null
|
|
46
48
|
}
|
|
@@ -193,11 +193,15 @@ class HybridRecognizer: HybridRecognizerSpec {
|
|
|
193
193
|
internal func startHapticFeedback() {
|
|
194
194
|
if let hapticStyle = config?.startHapticFeedbackStyle {
|
|
195
195
|
HapticImpact(style: hapticStyle).trigger()
|
|
196
|
+
} else {
|
|
197
|
+
HapticImpact(style: .medium).trigger()
|
|
196
198
|
}
|
|
197
199
|
}
|
|
198
200
|
internal func stopHapticFeedback () {
|
|
199
201
|
if let hapticStyle = config?.stopHapticFeedbackStyle {
|
|
200
202
|
HapticImpact(style: hapticStyle).trigger()
|
|
203
|
+
} else {
|
|
204
|
+
HapticImpact(style: .medium).trigger()
|
|
201
205
|
}
|
|
202
206
|
}
|
|
203
207
|
|
package/package.json
CHANGED