From fe3e58378dc1c4ef9c14cac9592e99adbcd198f1 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Tue, 3 Jan 2023 15:20:28 +0900 Subject: [PATCH] [Tizen] Add to play inserted text using tts player - Currently in tizen 6.0, text is read only when keyboard character is focused, and not when text is inserted. - So, updated to read inserted text with Tts player. Change-Id: I3853bdf8292d7f9668ac3917ef96300cfc309234 Signed-off-by: Seoyeon Kim --- dali-toolkit/internal/text/text-controller.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index f96c976..670c6d9 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include #include #include #include @@ -2278,6 +2279,13 @@ void Controller::InsertText(const std::string& text, Controller::InsertType type DALI_LOG_INFO(gLogFilter, Debug::Verbose, "Controller::InsertText %p %s (%s) mPrimaryCursorPosition %d mPreEditFlag %d mPreEditStartPosition %d mPreEditLength %d\n", this, text.c_str(), (COMMIT == type ? "COMMIT" : "PRE_EDIT"), mImpl->mEventData->mPrimaryCursorPosition, mImpl->mEventData->mPreEditFlag, mImpl->mEventData->mPreEditStartPosition, mImpl->mEventData->mPreEditLength); + // Play the input text with the TTS player. + Dali::TtsPlayer player = Dali::TtsPlayer::Get(Dali::TtsPlayer::SCREEN_READER); + if (player) + { + player.Play(text); + } + // TODO: At the moment the underline runs are only for pre-edit. mImpl->mModel->mVisualModel->mUnderlineRuns.Clear(); -- 2.7.4