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

Base64 URL Link in <a> Tag Fails to Start Player: Possible Extension Issue #268

Open
mathkartel opened this issue Jan 25, 2025 · 1 comment

Comments

@mathkartel
Copy link

mathkartel commented Jan 25, 2025

I am trying to pass this Base64-encoded link via <a>, but the player doesn't start (I believe it's because the link lacks an extension in its name). How can I adjust this? Do you know a solution?

@scottschiller
Copy link
Owner

I think for most of the demo players, I have them check the link for "playability" by looking for a MIME type hint as a type attribute. So if you had something like <a href="data:audio/mp3;base64,xxxxxxx" type="audio/mp3">link</a>, the type attribute should help if not the portion of the data URI itself.

I have not updated SM2 in a number of years, and it uses HTML5 Audio() objects as opposed to the more modern (and at this point, very well-supported) Web Audio API which has much more powerful audio capabilities.

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