Acess to unminified JS Code of ContentTypes

Forums: 

Hello,

I would like to understand, how the AudioRecorder works. I tried to work through the JS Code, but only found the minified version in the "dist" folder and the source code on https://github.com/h5p/h5p-audio-recorder/tree/master/src (I suggest that needs to be bundled by wepack, before it can be executed on the browser). As I don't know how Webpack works, I'd like to ask if there is a unminified JS Code also?

BTW: Is it possible, that the AudioRecorder also works on Safari IOS but is not activated there? In GitHub there is a comment "HFP-1295 Add iOS support" but on https://h5p.org/audio-recorder it states: 

"Important note: This content type currently has limited browser support. It works on Edge, Chrome and FireFox. We hope more browsers will implement support for the ways this content type does recordings."

Best!
Benedikt

 

otacke's picture

Hi Benedikt!

You're correct. Webpack will bundle the code pieces and also do some other stuff - like minifying. Since you have already found the source code on github, I assume that your question rather is how to build the package?

  1. Go into the folder and use npm install to get all the dependencies. You need to have npm, of course.
  2. Use npm run watch while coding to build the archive in the background or npm run build to get a version that's ready for production.

Alternatively, you can also use some unminifier, of course. There are free online services that can do the job for you, for example.

I have not checked Audio-Recorder lately, but there may be some other issues preventing it to work on iOS.

Cheers,
Oliver

Hi Oliver, 

thanks a lot for your answer. Great that you've joined the H5P team (already followed your posts on facebook in the past).
I got it to work. If I find out more about the ios issue, then I will let you know.

Best!
Bene

 

 

otacke's picture

Hi Benedikt!

Great that you figured out how to deal with the source code. And yes, please let us know if you find out more about the iOS issue.

Cheers,
Oliver