Using Web Worker to Load WebAssembly Barcode SDK

  • If you have tried the ‘hello world’ example of Dynamsoft JavaScript Barcode SDK, you should know that the SDK is built based on WebAssembly technology, which allows you to develop web client-side barcode reader app in pure JavaScript. The simple example demonstrates how to decode barcode from an input file.

    However, in most scenarios, a web barcode reader features real-time decoding for camera video stream. The principle for building a camera app is don’t block the UI thread. If you call the barcode API in JavaScript main thread and the API takes more than 100ms to decode barcodes, the UI cannot render smoothly. That is why we need to use web workers.

    When using WebAssembly, it may take a long time to download and compile the wasm file. Dynamsoft provides two JavaScript barcode editions built with different optimization levels which influence the final wasm file size and initialization time.

    Read the full article:

A community for developers looking to put WebAssembly to use today. Come rock WebAssembly with us!