MDL-78349 tiny_recordrtc: Add lamejs library

This commit is contained in:
meirzamoodle
2025-02-24 20:51:28 +07:00
committed by Huong Nguyen
parent 7a318d5c85
commit c857e0c6ac
5 changed files with 15565 additions and 0 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,32 @@
lamejs 1.2.1
--------------
https://github.com/zhuker/lamejs
Instructions to import lamejs into Moodle:
1. Download the latest lamejs code somewhere (example /tmp/lamejs) using:
mkdir -p /tmp/lamejs
cd /tmp/lamejs
npm install lamejs --save-dev
Note down the version number displayed by the command, to update lib/editor/tiny/plugins/recordrtc/thirdpartylibs.xml accordingly.
If the command does not output a version number, the version number can be found in package.json. You can simply open package.json
using your desired editor and look for the version number of lamejs. Alternatively, you may use the following commands:
- MacOS:
cat package.json | grep lamejs
- Linux:
cat package.json | grep lamejs
or
jq -r '.devDependencies."lamejs"' package.json
2. Copy the following file to your local Moodle directory, to replace the old one:
cp /tmp/lamejs/node_modules/lamejs/lame.all.js [PATH TO YOUR MOODLE]/lib/editor/tiny/plugins/recordrtc/amd/src/lame.all.js
3. Add the following code to the bottom of the `lib/editor/tiny/plugins/recordrtc/amd/src/lame.all.js` file:
export default lamejs;
4. Update the new version in the `lib/editor/tiny/plugins/recordrtc/thirdpartylibs.xml` file.
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<libraries>
<library>
<location>amd/src/lame.all.js</location>
<name>lamejs</name>
<version>1.2.1</version>
<license>LGPL</license>
<repository>https://github.com/zhuker/lamejs</repository>
</library>
</libraries>