Skip to content

Commit 034cd4d

Browse files
committed
iOS: fixed #21
1 parent 7309de2 commit 034cd4d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ios/RNSpeechIFlytek/SpeechRecognizerModule.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ - (void) onResults: (NSArray *) results isLast: (BOOL) isLast {
133133
}
134134
}
135135

136+
- (void) onVolumeChanged: (int)volume {
137+
NSDictionary * result = @{
138+
@"volume": [NSNumber numberWithInt: volume]
139+
};
140+
if (hasListeners) {
141+
[self sendEventWithName: @"onRecognizerVolumeChanged" body: result];
142+
}
143+
}
144+
136145
- (NSString *) stringFromJson: (NSString *) params {
137146
if (params == NULL) {
138147
return nil;

0 commit comments

Comments
 (0)