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

MULTI_THREAD: Fix onmessageerror being undefined #1585

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

peaBerberian
Copy link
Collaborator

We recently defined a onmessageerror global callback on the WebWorker-side of the MULTI_THREAD feature, thinking that it was defined, like the onmessage callback, as long as WebWorker were accessible.

Turns out that was not the case at all, and the multithreading mode was breaking on older device. Oops, sorry about that.

As it is not required, we can just access it through our globalScope shortcut to the global object. This way, it will just define a callback which will never be called if it does not exist.

We recently defined a `onmessageerror` global callback on the
WebWorker-side of the `MULTI_THREAD` feature, thinking that it was
defined, like the `onmessage` callback, as long as WebWorker were
accessible.

Turns out that was not the case at all, and the multithreading mode was
breaking on older device. Oops, sorry about that.

As it is not required, we can just access it through our `globalScope`
shortcut to the global object. This way, it will just define a callback
which will never be called if it does not exist.
@peaBerberian peaBerberian added bug This is an RxPlayer issue (unexpected result when comparing to the API) Priority: 0 (Very high) This issue or PR has a very high priority. Efforts should be concentrated on it first. labels Oct 23, 2024
@peaBerberian peaBerberian added this to the 4.3.0 milestone Oct 23, 2024
@Florent-Bouisset Florent-Bouisset merged commit d5d1787 into dev Oct 23, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is an RxPlayer issue (unexpected result when comparing to the API) Priority: 0 (Very high) This issue or PR has a very high priority. Efforts should be concentrated on it first.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants