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

How to implement a custom “<audio>” tag? #454

Open
FunnySaltyFish opened this issue Aug 11, 2023 · 2 comments
Open

How to implement a custom “<audio>” tag? #454

FunnySaltyFish opened this issue Aug 11, 2023 · 2 comments

Comments

@FunnySaltyFish
Copy link

FunnySaltyFish commented Aug 11, 2023

  • Markwon version: newest

Hello, I want to build a translation app using Markown, and thanks for your astonishing work, it can show complex translation result. However, I'm not sure how to show an audio tag to implement speaking the result aloud function. The tag might be like:

<audio src="https://fanyi.baidu.com/gettts?lan=en&text=hello&spd=5&source=web"/>

And the markdown might be:

**Examples:**
1. example one <audio src="audio_url_of_example_1"></audio>
2. example two <audio src="audio_url_of_example_2"></audio>
3. ...

It might be rendered as an image or a button, and can set the onClick event so I can call some functions to speak the audio. It will be better to be an animatable widget so users can know whether the audio is playing or not. I've checked the examples and still don't know where to start.

Thanks!

@zhouzhuo810
Copy link

@FunnySaltyFish 我也遇到这个问题了,你解决了没

@FunnySaltyFish
Copy link
Author

nope, just like what you saw, no body answered. If you have a solution, it would be very helpful that sharing here,

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

No branches or pull requests

2 participants