[feat] Mobile Media Controls API support #14815
ahaoboy
started this conversation in
Plugin Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem
https://github.com/ahaoboy/musicfree-tauri/blob/2a85ec76c9d34b0dc3f3a5df48d69f34fe6e8ada/src/store/index.ts#L239C1-L266C5
I'm trying to implement a simple audio player using Tauri.
However, I'm encountering a problem on Android devices: when the app is in the background, it doesn't automatically play the next track. I'm using the web audio element, which works correctly on desktop.
Does Tauri have a native audio control API similar to https://github.com/Taiizor/tauri-plugin-media (not supported on mobile)? Or are there other ways to achieve automatic background playback on the web?
Describe the solution you'd like
This can be quite complicated because on the web, controlling the audio URL requires not only managing playback status, navigation, and speed, but also obtaining audio information such as duration and bitrate.
https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API
Alternatives considered
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions