Skip to content
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

Merged
merged 6 commits into from
Aug 17, 2018
Merged

Conversation

bsudekum
Copy link
Contributor

@bsudekum bsudekum commented Aug 9, 2018

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

@1ec5
Copy link
Contributor

1ec5 commented Aug 9, 2018

The “Verify UTF-8 strings files” step in CI is failing because of unrelated local diffs produced by the CocoaPods integration test.

@bsudekum
Copy link
Contributor Author

bsudekum commented Aug 9, 2018

/cc @ericdeveloper

/**
An `AVAudioPlayer` through which spoken instructions are played.
*/
public var audioPlayer: AVAudioPlayer?
Copy link
Contributor

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)
Copy link
Contributor

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.

@1ec5
Copy link
Contributor

1ec5 commented Aug 14, 2018

This could be one half of #1598, though it doesn’t help application code to coordinate AVSpeechSynthesizer utterances when Polly is unavailable.

@bsudekum bsudekum merged commit ef7a525 into master Aug 17, 2018
@bsudekum bsudekum deleted the public-player branch August 17, 2018 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants