Interface SpeechPlayer
-
- All Implemented Interfaces:
public interface SpeechPlayerDefines a contract for speech players used in NavigationView.
-
-
Method Summary
Modifier and Type Method Description abstract voidplay(VoiceInstructions speechAnnouncement)Will play the given string speechAnnouncement. abstract booleanisMuted()abstract voidsetMuted(boolean isMuted)Will determine if voice announcements will be played or not. abstract voidonOffRoute()Used in off-route scenarios to stop current announcement (if playing) and voice a rerouting cue. abstract voidonDestroy()Used to stop and release the media (if needed).
-
-
-
Method Detail
-
play
abstract void play(VoiceInstructions speechAnnouncement)
Will play the given string speechAnnouncement. If a voice speechAnnouncement is already playing or other speechAnnouncement are already queued, the given speechAnnouncement will be queued to play after.
- Parameters:
speechAnnouncement- with voice speechAnnouncement data.
-
isMuted
abstract boolean isMuted()
-
setMuted
abstract void setMuted(boolean isMuted)
Will determine if voice announcements will be played or not.
If called while an announcement is currently playing, the announcement should end immediately and any announcements queued should be cleared.
- Parameters:
isMuted- true if should be muted, false if should not
-
onOffRoute
abstract void onOffRoute()
Used in off-route scenarios to stop current announcement (if playing) and voice a rerouting cue.
-
onDestroy
abstract void onDestroy()
Used to stop and release the media (if needed).
-
-