Open ryanheise opened 1 year ago
should be helpful: https://github.com/ryanheise/just_audio/issues/1013#issuecomment-1636728734
Note, my goal here with asset loading is to bypass data URIs altogether, since the web platform exposes the http/s URis directly.
Is your feature request related to a problem? Please describe.
Currently the web implementation needs to encode the asset into a base64 URL which takes processing time on the main isolate.
Describe the solution you'd like
Unlike Flutter for iOS and Android, Flutter for web provides assets as files at a certain URL. I'm not sure if this is guaranteed to not change. For more information:
https://stackoverflow.com/questions/61301598/how-can-i-display-asset-images-on-flutter-web
As long as that holds true, the plugin could just play that URL directly rather than encoding a base64 URL.
Describe alternatives you've considered
If it turns out that the assets directory can't be relied upon, an alternative is to make the current approach more efficient. This would include:
Uri.parse
in the web implementation of the platform interface by using String URLs directly.Additional context
N/A