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

Playing audio in Lynx apps? #250

Closed
Seanitzel opened this issue Mar 10, 2025 · 2 comments
Closed

Playing audio in Lynx apps? #250

Seanitzel opened this issue Mar 10, 2025 · 2 comments
Assignees

Comments

@Seanitzel
Copy link

Seanitzel commented Mar 10, 2025

Hi,

I was wondering how does lynx handle audio?
It probably doesn't have web audio support, but are there any api's for more advanced audio control?

Couldn't see anything about it in the docs

@zhongyr
Copy link
Collaborator

zhongyr commented Mar 10, 2025

This may duplicated with #149

There is not a formal support for audio control yet, but you can integrate your extensions to Lynx with the following methods.

Audio's controlling are based on Native APIs on each platform. There are two methods to export the native functionalities to JS.

NativeModule

Native Module is used for bring the native features to front-end. You may create a native module with audio functions like

NativeModules.AudioManager.play("xxxx.mp3");

And binding this method to AVAudioPlayer on iOS, and something similar to it on Android.

Custom Native Components

And with a Custom Native Component you can also create something like <audio src="xxx.mp3"/> to play a sound.

@MoonfaceX MoonfaceX self-assigned this Mar 10, 2025
@Seanitzel
Copy link
Author

I see, thanks for the quick answer!

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

3 participants