Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(SUP-39292): V7 Player v3.15.2 Shows ReferenceError #212

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

SivanA-Kaltura
Copy link
Contributor

@SivanA-Kaltura SivanA-Kaltura commented Nov 14, 2023

Description of the Changes

Issue:
Console logs show the message "[Error] Category: 0 | Code: 0 | {name: internalException}" and in some cases also "ReferenceError: e is not defined"

Explanation:
hls.js uses a worker thread when decoding video messages
if the worker thread encounters an error, it will fallback to decoding on the main thread and will show the message "warn] > Error in "main" Web Worker, fallback to inline" (visible when playback.options.html5.hls.debug = true)

One of the changes included in the last hls.js version upgrade seems to have been a change in the worker-related code (possibly this one)
The hls.js version with these changes works fine when running the player locally, where webpack-dev-server runs with "--mode development"
However, once we build a version and use "--mode production", webpack optimization removes some code from the worker function (i did a text comparison of the worker runtime code and the production version has fewer lines of code), which then causes the worker to throw an error during initialization

This is similar to what is described in this issue

Solution:
Since decoding currently falls back to main thread anyway, we can just disable the worker as described in the issue above, which will prevent the console errors from appearing

Resolves SUP-39292, SUP-39280

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

@SivanA-Kaltura SivanA-Kaltura changed the title fix(SUP-39292): set enableWorker to false fix(SUP-39292): V7 Player v3.15.2 Shows ReferenceError Nov 14, 2023
@SivanA-Kaltura SivanA-Kaltura merged commit 0b80551 into master Nov 16, 2023
3 checks passed
@SivanA-Kaltura SivanA-Kaltura deleted the SUP-39292 branch November 16, 2023 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants