fix: patch echo360.js on the fly to avoid error in strict mode#4377
fix: patch echo360.js on the fly to avoid error in strict mode#4377mindcrunch4u wants to merge 8 commits intoLumieducation:masterfrom
Conversation
Run `npx prettier --write .`
|
Adding @JPSchellenberg for review since this also affects Lumi users. |
|
@mindcrunch4u Just noticed my name here by chance: I agree that this should be fixed in H5P.Video, but I am not the maintainer of that repository and cannot push anything. You will need to reach out to H5P Group. |
*BREAKING CHANGE*: HtmlExporter has now a different constructor signature
|
@mindcrunch4u Thank you for your PR. I've picked this up and generalized the patch mechanism. Unfortunately, I can't reproduce the issue to check whether the issue is actually solved by the PR. Can you give me a reproducible instruction how to cause the bug? |
|
@sr258 to reproduce, I simply added a video to a basic H5P project, then export as SCORM. See this issue. Your To verify using Lumi, this is my write-up: link. Basically:
|
|
@sr258 I've done the verification. My steps:
Here's the comparison. Without this patch (containing your commits), Lumi hangs when exporting the project: before-video.mp4With the patch: after-video.mp4Note: because of changes to |
Root Cause:
echo360.jsuses bad syntax, which causesuglify-jsto throw error instrict mode.Changes:
echo360.jsduring export.cc Original Author: @sr258
Regarding this issue:
I've created a PR here: link, let's hope otacke fixes this issue soon.
Meanwhile I'd like this propose a more flexible fix (this PR):
uglify-js.