Skip to content

WIP: Initial support for wasm32-unknown-emscripten

Mehdi Sabwat requested to merge b1ue/vlc:upstream/vlc.js.1 into master

This patchset is heavily based on the work done 4 years ago by Jean-Baptiste Kempf and Etienne Brateau on the asmjs port.

It would not have been possible without the support, patience and multiple reviews by @jbk , @Garf , @chouquette , @alexandre-janniaux , @tguillem , @magsoft, and @ePirat . Un grand merci à Videolabs!

Kudos to Alon Zakai from Emscripten and Paul Adenot from Mozilla, for the help with testing and for the quick interventions when things went wrong.

A demo application statically linking to libvlc compiled to wasm-emscripten can be tested with the procedure below:

# build:
# dependency: emsdk 2.0.17
# if not on linux, it is recommended to run :
# denv vlc-compile-wasm ./extras/package/wasm-emscripten/build.sh

# if you know what you are doing:
./extras/package/wasm-emscripten/build.sh

# pull and setup application:
cd ./extras/package/wasm-emscripten/build
git clone https://code.videolan.org/jbk/vlc.js.git --branch demo

PROJECT_DIR="../../build" SAMPLE="./BigBuckBunny.mp4" PATH_VLC="../../../../../" ./create_main.sh

emrun --no_browser vlc.html

NB: go to http://localhost:6931 (not 0.0.0.0, or else you'll need ssl and http headers

This was tested on arch-linux in :

  • google-chrome-90.0.4430
  • Mozilla Firefox 88.0
  • Mozilla Firefox 90.0a1 (faster playback)
  • Todo : Safari + other OSes
Edited by Mehdi Sabwat

Merge request reports