-
Notifications
You must be signed in to change notification settings - Fork 33
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
how to properly pause or stop reading after completed reading a block of test? #58
Comments
Hi @danielignatius , the onPause function is a callback that is invoked when the player pauses. It is typically invoked after a call to player.pause() To pause playback, you can either call the players pause method or the playlists pause method. |
Hi @Hagsten , thank you for the advice. I had a put a playlist.pause(); or the player.pause(); on the onPause function because it was pausing before reading the next block of text. In this case, can you share with me how to stop the web reader from reading text 2 after reading text 1. See screenshot. Is there an event I can use to catch and pause the playlist or player? Thanks @Hagsten |
What is the purpose of pausing in the middle of the playlist? I would say that you just include whichever paragraphs you need in the playlist by using withElements (https://github.com/Hagsten/Talkify#playlist-fluent-builder) to narrow down your scope. The playlist will always play all its paragraphs until it has played the last. Or keeping your own playlist and just using the player instance which you can control as you want :) |
@Hagsten Thanks for sharing your insight on how the playlist actually works. I actually have two sections that I want the text to be read out for my audience. One section on the top (A) and the other section at the other side of the page (B). I don't want B to be read out immediately after A has been read out. Is there a way to gracefully stop B from reading out immediately after A has been read out? It would be great to stop reading B out without the audience clicking on the stop button. I only want B to be read out if the audience click on the text or sentence. Your suggestion is appreciated. |
This is a great script. But the playlist.pause(); or the player.pause(); is not firing after the onPause fn is fired. I cant seem to stop or pause from reading the next block of text. Any advice is appreciated.
The text was updated successfully, but these errors were encountered: