May 6, 2025
The potential of WebAssembly in HbbTV

WebAssembly (WASM) has revolutionized the way web applications are developed and executed. It is a powerful tool, enabling near-native performance for complex applications within browsers. As an essential technology for modern web development, WASM is transforming the capabilities of web applications, making them more efficient, secure, and versatile than ever before.
One area where WASM shows significant potential is in Hybrid Broadcast Broadband TV (HbbTV). This open standard for the delivery of interactive TV services integrates traditional broadcast TV with internet-based content. WASM can enhance HbbTV applications by providing a more efficient and performant execution environment for interactive features, making HbbTV services more responsive and capable of handling complex tasks including software based video decode.
What is WebAssembly (WASM)?
WebAssembly (WASM) is a low-level, binary instruction format designed to provide a portable, efficient, and secure execution environment for web applications. Often described as a “virtual machine for the web,” WASM enables developers to run code written in various programming languages, such as C, C++, and Rust, directly in web browsers. Its primary goal is to bridge the gap between native and web performance, making complex and compute-intensive applications feasible within the browser environment.
WASM operates as a complement to JavaScript, leveraging the WebAssembly runtime embedded in modern browsers. Developers compile source code into the WASM binary format, which browsers can execute at near-native speeds. Importantly, WASM is secure by design, running in a sandboxed environment to prevent malicious access to the underlying system.
WASM binary format is a bytecode like Java bytecode and the Common Intermediate Language of .net. There is a human readable version of the WASM known as WebAssembly text. WASM binary files have the extension .wasm, WASM text files have the extension .wat.
A brief history of WebAssembly
WASM emerged in 2015 as a collaborative effort among key players in the web development community, including Google, Mozilla, Microsoft, and Apple. The motivation was to overcome the limitations of JavaScript for performance-critical applications, such as games, video editing, and scientific simulations.
Initially conceived as an evolution of asm.js (a subset of JavaScript optimized for performance), WASM quickly gained traction for its versatility and efficiency. It became a W3C standard in 2019, cementing its role in the web ecosystem. Over time, its use has expanded beyond browsers, finding applications in server-side development, edge computing, and embedded systems.
WASM is now considered as the fourth language of the web after HTML, JavaScript and CSS.
In 2024 W3C published WASM 2.0, a new snapshot incorporating feature extensions that had been deployed with mature implementations.
WASM continues to evolve through a feature development process.
Major use cases of WASM
Major use cases for WASM include:
- High-Performance Web Applications: WASM powers compute-heavy applications, including 3D games, CAD tools, and video editors, delivering near-native performance in the browser.
- Cross-Platform Development: Developers can compile code written in languages like C++ or Rust into WASM, ensuring it runs seamlessly across different platforms.
- Server-Side Computing: Frameworks like Node.js now support WASM, enabling high-performance server-side workloads.
- Edge Computing: WASM’s portability makes it ideal for edge environments, where it can execute securely and efficiently on resource-constrained devices.
- Embedded Systems: Its compact size and sandboxing make WASM suitable for use in IoT devices and other embedded systems.
A brief overview of HbbTV
HbbTV (Hybrid Broadcast Broadband TV) is a global standard that integrates traditional broadcast television with internet-based content and services. It allows broadcasters to enhance TV experiences with interactive applications, such as video-on-demand, targeted advertising, and gaming.
HbbTV applications are built using HTML5 and JavaScript, leveraging web technologies to deliver these services. However, as the complexity and demands of applications grow, the limitations of JavaScript become apparent, this is where WASM could play a transformative role.
How WASM could enhance HbbTV
The potential ways in which WASM could enhance HbbTV include:
- Improved Performance for Interactive Applications: WASM’s ability to run high-performance code could enable smoother and more responsive HbbTV applications.
- Complex Media Processing: Tasks like video encoding, decoding, or image manipulation could be performed using WASM, enabling new classes of applications.
- Cross-Language Development: By supporting multiple languages, WASM enables developers to reuse existing codebases written in C++ or Rust, reducing development time for HbbTV applications.
- Security for Third-Party Apps: WASM’s sandboxed execution aligns well with HbbTV’s need to run third-party apps securely, ensuring a robust and isolated environment for interactive content.
- Resource-Constrained Devices: WASM’s compact binary format and efficient runtime make it suitable for HbbTV-enabled devices with limited hardware capabilities, such as older smart TVs or set-top boxes. Though, unless already enabled, back porting of WASM to older smart TVs is unlikely.
Challenges and considerations
While the potential is clear, integrating WASM into the HbbTV ecosystem presents challenges:
- Adoption of WASM Runtimes: HbbTV devices need to support a WASM runtime, which may require updates to existing software. Many existing television models already have support for WASM but widespread support will only come in future years.
- Developer Learning Curve: Transitioning from JavaScript to WASM or incorporating WASM into workflows may require upskilling development teams.
- Standardization: There are many feature extensions to WASM and aligning WASM capabilities with HbbTV specifications is necessary to ensure interoperability across devices. This is being resolved through the inclusion on WASM in the HbbTV 2.0.5 specification.
WASM and HbbTV 2.0.5
When building WASM application it is important to have a consistent core and set of feature extensions as a target.
For HbbTV 2.0.5 the following have been mandated:
- WebAssembly Core 2.0
- WebAssembly JS API 2.0
- WebAssembly Web API 2.0
- Extended constant expressions feature exentention
This set has been supported by Chrome since May 2023, by Firefox since April 2023, by Safari since March 2024 and node.js since October 2023.
The feature extension in WebAssembly Core 2.0 and ‘Extended constant expressions’ maps to the WASM target known as Lime1. Limes are a series of defined and stable subsets of WASM features that producers and consumers can both use to promote interoperability. Once a Lime configuration is defined, it will be stable with no features added or remove. To date only Lime1 has been defined.
WASM application can be complied against a Lime1 target to make them compatible with HbbTV 2.0.5.
emcc -mpcu=lime1 …WASM is available in existing HbbTV implementation, but available features may vary. There are packages to help detect WASM feature availability including one from GoogleChomeLabs.
HbbTV 2.0.5 will be published in the middle of 2025, with the test suite and devices supporting 2.0.5 being available in 2026 and beyond.
Accessibility proof-of-concepts
During IBC 2024 3CAT the Catalonian broadcaster demonstrated two WASM based HbbTV proof-of-concept applications running on off-the-shelf televisions. The proof-of-concepts were based on improving accessibility services, through enhanced subtitling and sign-language.
3CAT had looked at WASM as they need to perform CPU intensive tasks that were time constrained as they needed to be synchronized with the audio and video of the service.
Subtitling
3CAT has developed and deployed a HbbTV application to display EBU-TT-D subtitles for its viewers. It ran on all devices but on low-end devices the user experience was poor with subtitles going out of sync with the video.
By moving the parsing and selection of EBU-TT-D subtitles to WASM, including traversing all subtitles, selecting the one matching the timecode and preparing it for display, they saw an impressive improvement in performance.
| Action | Mean time in js (ms) | Mean time in WASM (ms) | Improvement (%) |
|---|---|---|---|
| Ebu-tt-d parsing | 1,650.30 | 231.04 | 86% |
| Subtitles rendering | 3.80 | 1.06 | 72% |
More details are available on GitHub here.
Signing service
3CAT believed the best way to show sign language to viewers is through a second video that is separate the main video. This enables the signing video to be repositioned on the television screen as a picture-in-picture.
The latest television models have the capability to concurrently decode multiple video streams, but this capability is not exposed to the applications due to the complexity of implementing this.
Software decode of video in JavaScript was not practical but 3CAT thought that with WASM this might be possible. For IBC 2024 they successfully demonstrated an Ogg based video decoding at 25 frames a second. They have since updated their proof-of-concept to show H.264 and H.265 video with a resolution of 400×500 and a bitrate of 300Kbps.

The updated proof-of-concept was run at the plugfest in London in 2025 with the following results across the television available:
| Format | Zero dropped frames | Some dropped frames | A lot of dropped frames | Does not run |
|---|---|---|---|---|
| MP4 with H264 | 5 | 3 | 1 | 0 |
| MP4 with H265 | 3 | 4 | 2 | 0 |
| MPEG-DASH with H264 | 6 | 3 | 0 | 0 |
With the proof-of-concept 3CAT has shown they can improve accessibility with WASM. They have also demonstrated that software video decode is possible enabling a wide range of additional use cases.
Other WASM use cases
WASM use cases under consideration include:
- Video mosaics and multiple camera angles
- Games engines and volumetric video
- White box cryptography
Video mosaics and multiple camera angles
Sports like F1, golf, and tennis offer multiple camera angles, but managing these can be complex and can be impractical for service side rendering. In F1, following 3 out of 20 cars creates 6,840 combinations; with viewer controlled order, it becomes 41,040. Adding more angles increases these permutations greatly, reaching millions. Similar complexity could exist with other sporting events like Wimbledon or the Olympics. Music festivals like Glastonbury would also face challenges, with 10 main stages among 100.
WASM with multiple software decodes would allow a viewer to choose the array of multiple camera angles they would like to see. This concept could be extended to user interfaces that could benefit from user controlled video mosaics.

Games engines
Many common game engines (e.g., Unity, Unreal) are already being utilized with WASM to facilitate the porting of console game elements into web browsers. While gaming may not be a primary use case for HbbTV, these game engines are also employed to support volumetric video, which could have potential applications within HbbTV.
Volumetric video experiences are frequently rendered using game engines. This type of capture is designed primarily for individuals with VR headsets, enabling them to immerse themselves fully in the content. However, it can also be rendered on any screen for broader inclusion. Client-based rendering is particularly advantageous when it is desirable to provide the viewer with control over their viewing perspective.
Games engines running in WASM could bring volumetric video to HbbTV based televisions.
White box cryptography
White-box cryptography is a cryptographic key protection strategy that presumes an attacker has complete access to the cryptographic implementation. It aims to protect keys by obfuscating them within the code, thereby making it challenging to extract them even in compromised environments. WASM is being employed for this purpose.
For HbbTV, white-box cyptography could enable application developers to utilize Digital Rights Management (DRMs) that are not natively supported on a television, or when the native DRMs are inaccessible.
Conclusion
WebAssembly represents a significant step forward for web and embedded applications, offering unmatched performance, security, and versatility. Its integration into HbbTV could unlock a new era of interactive, high-performance television experiences. By addressing challenges like runtime adoption and standardization, broadcasters and developers can leverage WASM to push the boundaries of what’s possible in hybrid TV.
As WASM continues to evolve, its application in HbbTV could set a benchmark for the future of interactive media delivery, combining the best of broadcast and broadband technologies.
Innovation will come from developer experimenting with the technology. It is important to get the message to HbbTV developers that the technology is becoming widely available and they should start experimenting now.
Learn more at the HbbTV developer portal, by joining the HbbTV developer Slack community and by watching the HbbTV webinar on WASM.
Matthew Huntington
Manager of the HbbTV Developer Programme
