WebApp for Audio - javascript

I would like to build a webapp for audio „confoguration“. The basics are clear for me but there‘s one point I don‘t know how to accomplish it:
There will be several aufio files uploaded and included in the user dashboard. The user can see the files listed in their dashboard and should be now able to grab and drop them in a new space at the end of the site. After that they can export the whole new file. So out of 5 single audio files will be generated 1 whole file.
sorry.. do you get what I mean?
Thanks for your help!

You could use something like jQuery sortables in order to create the lists in your dashboard. Take a look here https://jqueryui.com/sortable/#connect-lists .
In case you don't want to use jQuery in your project, a search for "js sortable lists" should provide you with plenty other solutions.
In case I understood your question wrong and you are asking how to concatenate audio files, you may want to check out m4tthumphrey's ConcatAudioFilter https://gist.github.com/m4tthumphrey/a863aa64dd541cfb4472 to get an idea how this may be achieved.
(I assume you are using php serverside, as the post is tagged with php)

If you are asking about combining 5 audio files in one file. You can use ffmpeg. You can check the link, this is the node module for ffmpeg: https://github.com/fluent-ffmpeg/node-fluent-ffmpeg.

Related

Generic file uploader for CKEditor 5 (ckeditor-angular)

I need to create a generic file upload plugin (pdf, docx, ...) that uploads to a server and resolves the link in the document
Is this possible? I found a bunch of 'solutions' in the last 2 weeks but whenever they use the word 'file', it ends up being images only.
Although a file browser/manager would be the best solution, it seems I can't use CKFinder since the backend must be flask and CKFinder only has certain connectors (php, coldfusion, ...)
I am sorry for the open-ended question but I am uncertain how to solve this properly.
PS: Custom builds do not seem to be supported directly as indicated by the introduction of the next link, but it looks like there could be a possible solution if CKEditor isn't implemented in a 'clean' way?
https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html
CKEditor 4 provided some hooks to allow you to add your own custom file browser and connectors: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_file_manager_configuration.html
This is what we used to roll our own file browser.
I think this is what you're looking for in CKEditor5
https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/upload-adapter.html#implementing-a-custom-upload-adapter

Dynamically Saving Images to a PDF template

I'm building a website where people can pick several pictures from a range.
I then want the users to be able to create a PDF using those pictures. However I want those pictures inserted in predefined positions and sizes in a template I have already created which will contain other predone materials (words pictures etc).
So my question :
its possible ?
Can anyone recommend a library which will satisfy my needs, I have had a look and I cant see any PDF libraries that seem to mention templates
Any guidance on where to start will be greatly appreciated.
Yes, this is completely possible.
I would recommend using wkhtmltopdf to generate the pdfs from an html template.
Another handy library for this kind of work is image.intervention
Both of these would work with PHP.
If you're working in javaScript you may want to use PDFKit
Edited: Only if you use php.
There are several libraries you can use to generate a pdf depending on what template you will build your pdf. I hardly recommend TCPDF. You can use html to layout the design you want or you can embed the image directly on a page. See an example here.

HTML / Javascript only recursive search?

I posted on a wishlist of a JS library that I wish their documentation search included results from more than just the titles of the pages. After I posted I realized that that may be difficult since when users download it from Github and use the docs on their local machine there is no server side code that will run such as PHP that could traverse the filesystem and parse all the results into an array, but before I just assume that there isn't a way to do it I thought I would ask.
When you look at this link: http://threejs.org/docs/index.html#Manual/Introduction/Creating_a_scene
If you type in anything that isn't part of the list on the left, it won't show up, such as if you type in goal nothing shows even though in the first sentence it says The goal of this section. Is there a way to put together a JS search that would traverse all the files that are on the list put the text into an array that could be searched without server side code?
I know Jquery would probably make the job easier, but I doubt he would include that in his repository, so as plain vanilla JS as possible would be preferred.

Downloading all files in a directory using jQuery or JS, or PHP?

Now, I know that when I post here on SO, it is best if I include code that I've tried. The issue is, I cannot find anything on Google that is specific to my needs. So I am taking a small risk asking this question with no code to show what I've tried, because in reality I haven't been able to try anything except changing file extensions of compressed folders to match the devices used to download them on. So, here it goes -)
I have a folder, it contains 15 .MP3 files. The viewers of the site can download them via an audio player I found online (Royal Audio Player). I want to incorporate a way (not into the Audio Player, in separate HTML using images) that allows my users to have the option of downloading all the MP3 files at once, and not on-by-one.
Is there a way to do this? Any help is appreciated and I apologize again for not providing any code for people to see. Thanks in advance. =)
EDIT: Changed the title to ask about PHP methods also. =)
Create an anchor element like this
Download All
And in php, add a route on this path and create a zip and return the zip as a response.
You can use these examples on php.net to know how to create a zip in php.

Edit Apache mod_autoindex to preview images and mp3

Is there some way to change mod_autoindex so that whenever a file of image types (jpg, png, etc.) or audio (mp3, ogg) it either opens one of those little embedded windows and shows the image or uses a flash or HTML5 based audio player to play the file. I know this module has many options for customization, but I can't figure out what code it uses to generate the file list.
Short Answer
Yes, there are several ways how to do this. Which one is right for you depends on your personal needs and skill-set. Your options are to either edit the C source code and create your own Apache Module, or to add extra functionality by declaring either a Client Side or Server Side script to be used as (or included from) the header of the index file.
Long Answer
Edit the Source Code
The only way to actually change the list, which is also the hardest option, would be to edit the source code and compile your own Apache Module. The HTML code for each file is put together on line 1852 in the mod_autoindex.c file. If you don't know C or if the code looks too daunting for you, there is no way to change the list directly.
You can, however, change the list indirectly by adding (either server side or client side) functionality to the index header or footer file.
Which brings us to easier options.
Add Server Side Functionality
Although you can't alter the list, you can make additions by having a server-side script that scans the directory you are browsing and adding thumbnails/previews for certain files. You could even hide the original list entirely with CSS and have the server side script build your own custom list.
Of course, you would have to be able to program Python/Perl/Ruby/PHP/etc. to do this.
I took a stab at this in PHP a while ago (mostly as an exercise) in my Apache Directory List Theming project. It doesn't do anything other than show a list of thumbnails for all of the images and PDF files in a given directory. (It's also not very sophisticated).
If you would also like to add previews for audio and/or video files, and you would like these previews to be present in the list generated by Apache, you're probably better of with a client side solution.
Add Client Side Functionality
By adding Javascript functionality, you could parse the list and for each file that is of interest to you insert a preview into the list. The prettyAutoIndex project does this. I haven't personally used it but it looks, well, pretty :-) It doesn't seem to be actively developed, but if it works it doesn't really have to be.
If its not what you want and you can code in Javascript, it shouldn't be too difficult to create something by yourself.
Wrapping up
If you decide to create a server or client side solution, it shouldn't be much more complicated than creating a file with some functionality and calling it from your Apache Config with headername:
<IfModule mod_autoindex.c>
HeaderName /path/to/header.file
</IfModule>
Unfortunately there are some gotchas, so I would suggest taking the time to read the relevant parts of the mod_autoindex manual.

Categories

Resources