©2026 Axis Communications AB. AXIS COMMUNICATIONS, AXIS, ARTPEC and VAPIX are registered trademarks of Axis AB in various jurisdictions. All other trademarks are the property of their respective owners.
The Axis Web Video Player makes it easy to use Axis camera video inside a browser.
Install the package from npmjs.com:
npm install @axis-communications/axis-web-video-playerSee the API reference for detailed information about the classes and interfaces in the Axis Web Video Player.
See the code example for a basic example on how to use the Axis Web Video Player.
The published npm package built from this repository includes a WebAssembly binary that contains the vast majority of the application logic. It includes performance-sensitive media features for live and playback functionality as well as Axis-specific signaling protocols (used in WebRTC).
That packaged WebAssembly binary is located in the bundled file webrtcvideo_bg.wasm, and it is loaded at runtime by the dependency initialization code.
Internally the published package resolves the wasm URL with new URL("webrtcvideo_bg.wasm", import.meta.url) and then fetches it.
This means your build must:
- include the
.wasmasset in the final output, - preserve a working URL from the emitted JS to the emitted wasm file,
- serve the wasm file with
Content-Type: application/wasm.
Usually a modern bundler will do all this for you, but some bundlers may fail to detect or emit wasm assets correctly when dependencies are transformed, externalized, or copied without their adjacent binary files. If you see runtime fetch/404 errors for webrtcvideo_bg.wasm, verify the emitted asset path and bundler wasm handling in the npm package build.
The example app in this repository enables wasm handling in Vite via vite-plugin-wasm so you can verify the published package behavior in a browser build.
Because the runtime initializes WebAssembly and performs dynamic JS glue operations, your CSP must allow these operations in the page where the player runs.
Use this as a baseline and then tighten it for your deployment:
Content-Security-Policy:
default-src 'self';
script-src 'self' 'wasm-unsafe-eval';
connect-src 'self' https: wss:;Notes:
connect-srcmust include your actual signaling and API endpoints.- If your browser baseline does not support
wasm-unsafe-eval,unsafe-evalmay still be required.
Information about licenses applicable for Axis Web Video Player components is stated in LICENSE.md.