MapboxVoiceInstructionsPlayer

class MapboxVoiceInstructionsPlayer @JvmOverloads() constructor(context: Context, accessToken: String, language: String, options: VoiceInstructionsPlayerOptions, audioFocusDelegate: AsyncAudioFocusDelegate)

Hybrid implementation of MapboxVoiceInstructionsPlayer combining VoiceInstructionsTextPlayer and VoiceInstructionsFilePlayer speech players.

Constructors

MapboxVoiceInstructionsPlayer
Link copied to clipboard
fun MapboxVoiceInstructionsPlayer(context: Context, accessToken: String, language: String, options: VoiceInstructionsPlayerOptions = VoiceInstructionsPlayerOptions.Builder() .build(), audioFocusDelegate: AudioFocusDelegate)
MapboxVoiceInstructionsPlayer
Link copied to clipboard
fun MapboxVoiceInstructionsPlayer(context: Context, accessToken: String, language: String, options: VoiceInstructionsPlayerOptions = VoiceInstructionsPlayerOptions.Builder() .build(), audioFocusDelegate: AsyncAudioFocusDelegate = buildAndroidAudioFocus(context, options))

Functions

clear
Link copied to clipboard
fun clear()
Clears any announcements queued.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
play
Link copied to clipboard
fun play(announcement: SpeechAnnouncement, consumer: MapboxNavigationConsumer<SpeechAnnouncement>)
Given SpeechAnnouncement the method will play the voice instruction.
shutdown
Link copied to clipboard
fun shutdown()
Releases the resources used by the speech player.
toString
Link copied to clipboard
open fun toString(): String
volume
Link copied to clipboard
fun volume(state: SpeechVolume)
The method will set the volume to the specified level from SpeechVolume.