[ABD] Audio Player 🎶

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

[ABD] Audio Player 🎶

Post by 3Di »

๐ŸŽถ Audio Player ๐ŸŽต

โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰ยป phpBB Studio
โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰:label: 1.0.3-RC
โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰ โ€‰โ€‰โ€‰ :tools: โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰
โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰ โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰โ€‰phpBB >= 3.3.3


:inbox_tray: Download: https://phpbbstudio.com/extensions/audi ... r-playlist

Description:
  • Playlists as CSV or TXT attachments
  • GFX visualizer - overlaps the bottom of the cover image
  • Progress bar with progression time and duration.
  • Volume slider (0 to 100)
  • Actions:
    - Play, Stop, Pause, Next, Previous, Forward and Backward (20 sec. step), toggle visualizer, toggle mute, toggle repeat track.
  • Automatic loop on play, the player loads stopped.
  • Player is visible only in the first post of the topics.
  • Player is not quotable nor preview-able.
  • Only playlists with our custom header will be embedded.
  • Standard CSV / TXT are parsed as usual.
  • Multiple playlists in the same topic will be merged automatically into the player.
  • Permissions are those native of phpBB about attachments.
  • Collapsible playlist
  • Hidden playlist attachment's download
  • PHP 8 ready
Author notes:
  • Made using the Web Audio API and a mix of 2 snippets slightly modified by 3Di.
  • Due to cross-origin security rules only local files will be played with the visualizer
    - (there is a toggle button, can otherwise be set on a per forum basis)
Tested audio type:
  • MP3, AAC, WAV, FLAC
Credits:
  • Special thanks to Obfuscated who has made this work current and distributable.
  • Code contributors are credited in the code itself where appropriated.
  • Kevin MacLeod (incompetech.com) for demo songs (full credits and license inside).
:film_projector: Demo: https://proteus.phpbbstudio.com/viewtopic.php?f=2&t=12
Image
Last edited by 3Di on Tue Sep 14, 2021 10:48 pm, edited 25 times in total.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][DEV] Audio Player 🎶

Post by 3Di »

  1. Once installed, you need to enable the visualizer for each forum where you want local files to be hosted.
  2. Go to ACP->Forums and edit the forum where you want to host only local files and have the visualizer,
    scroll down the page and you will find the option.
  3. In all other forums the visualizer is already disabled, so external files can be played without CORS problems.
Image
Last edited by 3Di on Tue Aug 24, 2021 9:09 pm, edited 4 times in total.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][DEV] Audio Player 🎶

Post by 3Di »

------------ About the colors of bars ---------------------------------------

OPEN `ROOT\ext\phpbbstudio\app\event\main_listener.php`

FIND

Code: Select all

			'APP_VISUALIZER_COL_T'	=> 'ff0000', // Top
			'APP_VISUALIZER_COL_M'	=> 'ffff00', // Middle
			'APP_VISUALIZER_COL_B'	=> '00ff00', // Bottom
Change the values accordingly to your likes. Ref: https://www.color-hex.com/

------------ About the CSV ---------------------------------------------------
  1. The header (first line) must remain untouched! The logic only embeds lists with it in place.
  2. Delimiters and separator [ " ] and [ , ] can not be changed nor removed
  3. No blank new lines at the end.
Example of CSV file (playlist) with local files in the same ROOT

Code: Select all

"song_title","site_url","song_origin","cover_origin","cover_album_origin","artist","album"
"Song 1","ROOT/media/album1/","01.mp3","cover1.jpg","cover_album1.jpg","John Doe","Album 1"
"song 2","ROOT/media/album1/","02.mp3","cover2.jpg","cover_album2.jpg","John Doe","Album 1"
Example using absolute (external) URLs - No visualizer

Code: Select all

"song_title","site_url","song_origin","cover_origin","cover_album_origin","artist","album"
"Song 1","","https://example.ltd/01.mp3","https://example.com/cover1.jpg","https://example.org/cover_album1.jpg","John Doe","Album title 1"
"song 2","","https://example.com/02.mp3","https://example.org/cover2.jpg","https://example.ltd/cover_album2.jpg","John Doe","Album title 2"
Last edited by 3Di on Sun Sep 12, 2021 5:32 am, edited 4 times in total.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
lopoto
Registered User
Posts: 111
Joined: Thu Feb 12, 2015 3:13 pm

Re: [3.3][DEV] Audio Player 🎶

Post by lopoto »

Working with php8 ?
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][DEV] Audio Player 🎶

Post by 3Di »

lopoto wrote: โ†‘Wed Aug 18, 2021 11:42 pm Working with php8 ?
Sure thing. :)

Developed with PHP 8.0.9 and declare(strict_types=1);
Demo link in first post (phpbb 3.3.5-dev and PHP 8.0.9)
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Toxyy
Registered User
Posts: 938
Joined: Mon Oct 24, 2016 3:22 pm
Location: Namek
Contact:

Re: [3.3][DEV] Audio Player 🎶

Post by Toxyy »

The progress slider did not load on first load, but I refreshed and it began to work after I turned off and on ublock origin.

When a song plays, if you slide the volume to the left, and then back to where it was, it is quieter than it originally started at.

Other than that, nice job! Any plans to let you select which part of the song to skip to on the progress slider?
I am a web developer/administrator, specializing in forums. If you have work you need done or are too lazy to do, pm me!

Some of my extensions:
[3.3][BETA] Post Form Templates || [3.3][BETA] Anonymous Posts || [3.2][3.3][BETA] ACP Merge Child Forums || [3.2][BETA] Sticky Ad || [3.2][DEV] User Delete Topics || [3.3][DEV] Moderate While Searching || [3.3][RC] Short Number Twig Extension
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][DEV] Audio Player 🎶

Post by 3Di »

Toxyy wrote: โ†‘Thu Aug 19, 2021 7:24 pm The progress slider did not load on first load, but I refreshed and it began to work after I turned off and on ublock origin.
That can only happens with AAC files, here by my side is ok. UBlock is ON btw.
Toxyy wrote: โ†‘Thu Aug 19, 2021 7:24 pm When a song plays, if you slide the volume to the left, and then back to where it was, it is quieter than it originally started at.
Noted already, not really easy to fix. But a new version will be online soon (lot of work on the code).
In my defence I can say I made all of this up in less than a week, not really enough time to study the Web Audio API in toto.
An interesting challenge so far, funny.
Toxyy wrote: โ†‘Thu Aug 19, 2021 7:24 pm Other than that, nice job! Any plans to let you select which part of the song to skip to on the progress slider?
Thx.
I removed such feature 2 days ago :), I wasn't happy with it as I coded it, but I will keep on doing, maybe.
ATM you can seek the track by 60 seconds each click (see gray buttons).
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][DEV] Audio Player 🎶

Post by 3Di »

New version available to test at the demo link in the first post.
- Lot of code enhancements.
* CORS issue *
- Now also external files can play but without visualizer (there is a new toggle button).
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][DEV] Audio Player 🎶

Post by 3Di »

Another new version is there to test.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][BETA] Audio Player 🎶

Post by 3Di »

v1.0.1 Beta Released - See first post.

See second and third post for instructions.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][RC] Audio Player 🎶

Post by 3Di »

v1.0.2-RC released - See first post for d/l and demo
### v1.0.2-RC on 27-aug-2021

- Hide playlist attachment's download
- jQuery optimisation
- Code optimisation
- Added version-check
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
BobMaster
Registered User
Posts: 21
Joined: Thu Feb 11, 2021 6:56 am

Re: [3.3][RC] Audio Player 🎶

Post by BobMaster »

[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbbstudio/app/core/utils.php on line 90: file_get_contents(./files/2_d84c4296ed21e833d7fcd90ab006831b): Failed to open stream: No such file or directory

Code: Select all

"song_title","site_url","song_origin","cover_origin","cover_album_origin","artist","album"
"GReeeeN","https://down.sky-and-poem.fun/source/music/various/GReeeeN%20-%20%E7%88%B1%E5%91%97.mp3","GReeeeN.mp3","https://p1.music.126.net/rG3w9Xsd09wnvVx1LwQ8aA==/628920651099603.jpg?param=875y600","https://p1.music.126.net/rG3w9Xsd09wnvVx1LwQ8aA==/628920651099603.jpg?param=175y175","GReeeeN","ใ‚ใ„ใฎใ†ใŸ~ใƒฉใƒดใ‚ฝใƒณใ‚ฐใƒปใ‚ณใƒฌใ‚ฏใ‚ทใƒงใƒณ~"
Any example to use external links?
Thanks!
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][RC] Audio Player 🎶

Post by 3Di »

This is an edge case where the images are not hosted in the same server as per the song itself.

So the site_url field should be left empty "", and use absolute URLS for each other.

Code: Select all

"song_title","site_url","song_origin","cover_origin","cover_album_origin","artist","album"
"GReeeeN","","https://down.sky-and-poem.fun/source/music/various/GReeeeN%20-%20%E7%88%B1%E5%91%97.mp3","https://p1.music.126.net/rG3w9Xsd09wnvVx1LwQ8aA==/628920651099603.jpg?param=875y600","https://p1.music.126.net/rG3w9Xsd09wnvVx1LwQ8aA==/628920651099603.jpg?param=175y175","GReeeeN","ใ‚ใ„ใฎใ†ใŸ~ใƒฉใƒดใ‚ฝใƒณใ‚ฐใƒปใ‚ณใƒฌใ‚ฏใ‚ทใƒงใƒณ~"
2021-09-12 05_47_16-Test equalizer - 3.3.4 Vanilla โ€” Mozilla Firefox.png
BobMaster wrote: โ†‘Sun Sep 12, 2021 3:25 am [phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbbstudio/app/core/utils.php on line 90: file_get_contents(./files/2_d84c4296ed21e833d7fcd90ab006831b): Failed to open stream: No such file or directory...
[/code]
Fixed for the next version.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
BobMaster
Registered User
Posts: 21
Joined: Thu Feb 11, 2021 6:56 am

Re: [3.3][RC] Audio Player 🎶

Post by BobMaster »

Thanks you!
Image
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: [3.3][RC] Audio Player 🎶

Post by 3Di »

v1.0.3-RC released - See first post for d/l and demo
### v1.0.3-RC on 15-sep-2021

- Properly escape JS vars
- Properly manage read file content for this use case
- Fixed potential bug on user mistake (never delete attachments directly on FS)
- CSS optimisation
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
Locked

Return to โ€œAbandoned Extensionsโ€