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

Demo: Only include DASH_WASM parser when explicitly asked for #1584

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

peaBerberian
Copy link
Collaborator

In our demo, we have specific scripts to start that demo with our WebAssembly MPD parser, the DASH_WASM feature.

What those do is to set a __INCLUDE_WASM_PARSER__ boolean to true in global scope, which signals to the demo page that it should include the DASH_WASM feature and load the corresponding WebAssembly file.

However I noticed that when enabling "multithreading" mode in our demo page, it tried to download the WebAssembly MPD parser regardless of the __INCLUDE_WASM_PARSER__ boolean.

This made sense pre-v4.1.0 when we only relied on the WebAssembly parser to parse a DASH MPD in "multithreading" mode. But now that we also have a JS parser embedded inside our worker code, it seems unnecessary.

It also led to some http 404 when testing the demo locally without having built the WebAssembly file. Those don't matter much though because the RxPlayer automatically fallbacks to the JS parser.

Also, the demo built on our GitHub pages accessible on https://developers.canal-plus.com/rx-player/ do have the WebAssembly MPD parser file built. This means that when enabling the "multithreading" mode on that demo, we're actually loading and using that WebAssembly file to parse MPDs.

Doing the change I'm proposing here of only using the WebAssembly parser if __INCLUDE_WASM_PARSER__ is set to true will thus lead to a small change in the globally-accessible demo page, where we will be using the default JS parser instead in "multithreading" mode.

We could also in the future add a checkbox in our demo specifically for the inclusion or not of the WebAssembly parser.

@peaBerberian peaBerberian added the proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it label Oct 23, 2024
@peaBerberian peaBerberian added this to the 4.3.0 milestone Oct 23, 2024
In our demo, we have specific scripts to start that demo with our
WebAssembly MPD parser, the `DASH_WASM` feature.

What those do is to set a `__INCLUDE_WASM_PARSER__` boolean to
`true` in global scope, which signals to the demo page that it should
include the `DASH_WASM` feature and load the corresponding WebAssembly
file.

However I noticed that when enabling "multithreading" mode in our demo
page, it tried to download the WebAssembly MPD parser regardless of the
`__INCLUDE_WASM_PARSER__` boolean.

This made sense pre-`v4.1.0` when we only relied on the WebAssembly
parser to parse a DASH MPD in "multithreading" mode. But now that we
also have a JS parser embedded inside our worker code, it seems
unnecessary.

It also led to some http 404 when testing the demo locally without
having built the WebAssembly file. Those don't matter much though
because the RxPlayer automatically fallbacks to the JS parser.

Also, the demo built on our GitHub pages accessible on
https://developers.canal-plus.com/rx-player/ do have the WebAssembly
MPD parser file built. This means that when enabling the
"multithreading" mode on that demo, we're actually loading and using
that WebAssembly file to parse MPDs.

Doing the change I'm proposing here of only using the WebAssembly parser
if `__INCLUDE_WASM_PARSER__` is set to `true` will thus lead to a small
change in the globally-accessible demo page, where we will be using the
default JS parser instead in "multithreading" mode.

We could also in the future add a checkbox in our demo specifically for
the inclusion or not of the WebAssembly parser.
@peaBerberian peaBerberian added the Priority: 3 (Low) This issue or PR has a low priority. label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 3 (Low) This issue or PR has a low priority. proposal This Pull Request or Issue is only a proposal for a change with the expectation of a debate on it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant