Skip to content
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

feat(useSpeechSynthesis): add stop function #2774

Merged
merged 5 commits into from Feb 17, 2023

Conversation

zwkkwz1
Copy link
Contributor

@zwkkwz1 zwkkwz1 commented Feb 16, 2023

Warning: ⚠️ Slowing down new functions

Due to the growing audience of VueUse, we received a huge amount of feature requests and pull requests. It's become harder and harder and recently a bit beyond our capacity to maintain the project. In the near future, we could like slowing down on accepting new features and prioritize the stability and quality of existing functions. New functions to VueUse may not be accpected. If you come up some new ideas, we advice you to have them in your codebase first instead of proposing to VueUse. You may iterate them a few time and see how them suite your needs and how them can be generalized. If you really believe they are useful to the community, you can create PR with your usercases, we are still happy to hear and discuss. Thank you for your understanding.

Description

after starting to speak, clicking stop will stop the sound, but the speak button will not be enabled again.(fixes #2764)

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (fixes #2764).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@zwkkwz1 zwkkwz1 closed this Feb 16, 2023
@zwkkwz1 zwkkwz1 reopened this Feb 16, 2023
@@ -113,6 +113,11 @@ export function useSpeechSynthesis(text: MaybeComputedRef<string>, options: UseS
utterance && synth!.speak(utterance.value)
}

const isStop = () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const isStop = () => {
const stop = () => {

It should be a verb... right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right..

@antfu antfu changed the title fix(useSpeechSynthesis): The status of useSpeechSynthesis is incorrect feat(useSpeechSynthesis): add stop function Feb 17, 2023
@antfu antfu merged commit 820e28e into vueuse:main Feb 17, 2023
@jw-foss jw-foss mentioned this pull request Mar 14, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The status of useSpeechSynthesis is incorrect
2 participants