SM2
Minimal Inline Audio Link Player
This extension automatically turns any audio URL or link into a minimal inline audio player without having to use something like bbcode. It is brought to you by SoundManager2, a popular JavaScript audio library. The advantage to using this versus standard HTML5 audio players is that this will look the same across browsers. Also, if you don't care too much about audio controls it gives you an unobtrusive way to add playable audio right inside a standard sentence (see screenshot). Click once to play, click again to pause. Simplicity is beautiful. This player will play:
- mp3
- mp4
- m4a
- aac
- ogg
- opus
- wav
- flac
Screenshot
Known Issue
The player will not appear immediately after you edit a post. But, it will appear any other time.
Install
composer require zerosonesfun/flarum-ext-sm2
Update
1) composer update zerosonesfun/flarum-ext-sm2
2) Deactivate and reactivate the extension in your admin. This refreshes important asset files.
3) Go to your dashboard, click tools, click clear cache.
4) Clear your browser cache, and any other caches like Cloudflare, if applicable.
Remove
composer remove zerosonesfun/flarum-ext-sm2
Then also delete the folder this extension adds to your public assets extensions folder.
Usage
Simply paste your audio URL into a post. Or, create a link to an audio URL using BBcode or Markdown. For example (markdown):
[Song Name](https://website.com/song.mp3)
Now go forth and spread music across your Flarums.
Links
GitHub: https://github.com/zerosonesfun/flarum-ext-sm2
Packagist: https://packagist.org/packages/zerosonesfun/flarum-ext-sm2