L3S DRM Developer Guide
The DRM UI can be implemented in your aircraft's cockpit using different gauge technologies. Choose the implementation that best fits your aircraft's architecture.
HTML/JS Gauge Implementation
Most Common: This is the standard implementation method used by most aircraft developers.
The DRM UI is implemented like a regular HTML/JS gauge in the aircraft's cockpit.
This allows you to display the DRM activation UI and handle user input (e.g., entering a license key) directly within the simulator. If you use an installer, you can add a license.key to the work folder, which will be used to activate the DRM.
In this case, no user input is required, and the DRM activation will be done automatically, without ever showing the UI.
Since the DRM UI is a HTML/JS gauge, it can be fully customized to fit your aircraft's design and user experience.

Required Files
The gauge folder contains the three required files to display the DRM activation UI in your aircraft's cockpit:
ModuleDrmGauge.htmlModuleDrmGauge.jsModuleDrmGauge.css
These are used to allow user interaction (e.g., entering a license key) and to display error or success messages.
As mentioned in the Overview, you must add this gauge to your 3D cockpit and ensure it is only visible when the
L:DRM_UI_VISIBLELVAR is set to1.
It is required that ModuleDrmGauge.js is properly loaded with the aircraft.
If it is missing or fails to load, DRM activation will not succeed.
Example panel.cfg Entry
Here is an example snippet to add the DRM activation panel to your aircraft:
[Vcockpit03]
size_mm=1024,768
pixel_size=1024,768
texture=$SCREEN_3
background_color=255,0,0
htmlgauge00=L3_Aircraft_HtmlGauge/ModuleDrmGauge.html, 0,0,1024,768Tip: You can change the
Vcockpitslot, dimensions, and texture as needed — just ensure the HTML gauge is present and only visible whenL:DRM_UI_VISIBLE == 1.
WASM Gauge Implementation
Advanced Integration: This method allows you to handle DRM authentication directly within your WASM code, providing more control over the user experience.
WASM gauge implementation gives you full control over the DRM authentication flow within your C++ WASM module. This approach is ideal when you want to integrate DRM activation into existing cockpit systems or create custom UI experiences.
Requirements
Important: Even when using WASM gauge implementation, you still need JavaScript components for username injection. A standalone JS-to-WASM username injector is currently work in progress.
Recommended setup:
- Set up the JavaScript panel for testing purposes
- Keep the JS components for username injection (required for DRM functionality)
- Implement your custom authentication UI in WASM
Authentication Flow
1. Monitor Ready State
Before attempting authentication, monitor the IsReady() function:
// Check if DRM is ready to receive authentication
if (drmPublish->IsReady()) {
// DRM module is ready - username received from JS
// and no request is currently in progress
} else {
// Still waiting for username from JS or request in progress
// Continue checking in your update loop
}IsReady() returns false when:
- No username has been received yet via JavaScript
- An authentication request is already in progress
2. Authenticate with Key
When the user inputs a license key and the system is ready:
// User has entered a key via your custom WASM UI
std::string userKey = GetKeyFromYourUI(); // Your implementation
if (drmPublish->IsReady()) {
// Authenticate with the plaintext key
drmPublish->AuthenticateWithKey(userKey);
}Note: Pass the key in plaintext - the DRM system handles all encryption and security internally.
3. Subsequent Launches
After successful authentication:
// On subsequent launches, check authentication status
if (drmPublish->IsAuthenticated()) {
// User is already authenticated
// No need to show authentication UI
} else {
// Show authentication UI for key input
}Automatic Storage: The DRM module automatically stores and loads authentication data. You don't need to save or resend keys on each launch.
Integration with Standard Flow
After authentication via WASM, all other DRM functionality works identically to the standard C++ integration:
- Use callback functions defined in
DRMInputConstants
Best Practice: Start with the JavaScript implementation for testing, then migrate to WASM gauge implementation once your authentication flow is working correctly.