From d362d8c171ac1e7f27cdeba044b2df679e37dcaf Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 20 Dec 2022 15:11:14 -0600 Subject: [PATCH] feat: Add `Tts::screen_reader_available()` to `Tts` resource. --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 6d3d7c1..578f8cc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,12 @@ pub use tts::{self, Backends, Error, Features, UtteranceId}; #[derive(Resource, Clone, Deref, DerefMut)] pub struct Tts(tts::Tts); +impl Tts { + pub fn screen_reader_available() -> bool { + tts::Tts::screen_reader_available() + } +} + #[derive(Debug)] pub enum TtsEvent { UtteranceBegin(UtteranceId),