-
Notifications
You must be signed in to change notification settings - Fork 319
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
Added onOffRoute call and removed queue from NavigationInstructionPlayer #986
Conversation
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.
@devotaaabel so the queue in NavigationInstructionPlayer
wasn't necessary? This shouldn't affect any queueing / caching right?
public class NavigationInstructionPlayer implements InstructionListener { | ||
|
||
private AudioManager instructionAudioManager; | ||
private AudioFocusRequest instructionFocusRequest; | ||
private MapboxSpeechPlayer mapboxSpeechPlayer; | ||
private AndroidSpeechPlayer androidSpeechPlayer; | ||
private Queue<VoiceInstructionMilestone> instructionQueue; | ||
VoiceInstructionMilestone voiceInstructionMilestone; |
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.
Does it make sense to store the String
voiceInstructionMilestone.getAnnouncement()
here instead of the milestone? Also this field can be private
rather than package-private.
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.
@danesfeder no because we need both the announcement
and the ssmlAnnouncement
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.
Ah okay, wasn't sure because ssmlAnnouncement
is immediately passed to:
mapboxSpeechPlayer.play(voiceInstructionMilestone.getSsmlAnnouncement());
a0d778c
to
5d85b1c
Compare
@danesfeder no it shouldn't affect the caching, that happens in |
5d85b1c
to
7c2d676
Compare
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.
@devotaaabel thanks for clarifying 🚢
Removed the queue from
NavigationInstructionPlayer
after realizing that everyVoiceInstructionMilestone
was the same instance. Added the onOffRoute call toNavigationViewModel
.