-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make audioPlayer public on MapboxVoiceController #1596
Conversation
The “Verify UTF-8 strings files” step in CI is failing because of unrelated local diffs produced by the CocoaPods integration test. |
/cc @ericdeveloper |
/** | ||
An `AVAudioPlayer` through which spoken instructions are played. | ||
*/ | ||
public var audioPlayer: AVAudioPlayer? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this property be available to Objective-C code?
CHANGELOG.md
Outdated
@@ -8,6 +8,7 @@ | |||
* Fixed an issue where the steps list drag handlebar disappears whenever the user taps the resume button. ([#1588](https://github.com/mapbox/mapbox-navigation-ios/pull/1588)) | |||
* Resolved the partially styled user interface issue that occurs when the style theme is switched between the `NightStyle` and `DayStyle`, after the resume button was tapped. ([#1589](https://github.com/mapbox/mapbox-navigation-ios/pull/1589)) | |||
* Fixed a rare crash associated with the keyboard when showing the end of route view controller. [#1599](https://github.com/mapbox/mapbox-navigation-ios/pull/1599/) | |||
* Made the AVAudioPlayer on MapboxVoiceController public. [#1596](https://github.com/mapbox/mapbox-navigation-ios/pull/1596) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as the developer is concerned, this property never existed before:
- Added a
MapboxVoiceController.audioPlayer
property. You can use this property to interrupt a spoken instruction or adjust the volume.
This could be one half of #1598, though it doesn’t help application code to coordinate AVSpeechSynthesizer utterances when Polly is unavailable. |
This moves
audioPlayer
off of RouteVoiceController and moves it to MapboxVoiceController and also makes it public.audioPlayer
was never used directly on RouteVoiceController but rather only used on the subclassed class MapboxVoiceController.This is useful for custom UI implementations- when the user leaves navigation mode, the developer should be able to interrupt the current voice instruction.
/cc @mapbox/navigation-ios