Fix Qt player by providing temporary overlay object

- In Qt environment, provide temporary window.overlay with log function
- This prevents errors from template's console.log override that runs immediately
- Qt's overlay.js will later replace this with the full overlay object
parent af6f2203
......@@ -54,9 +54,18 @@
return true;
};
// If already in Qt environment, load Qt scripts and exit
// If already in Qt environment, load Qt scripts and provide temporary overlay
if (isQtEnvironment) {
originalConsoleLog('[WebAdapter] Qt environment detected, loading Qt scripts');
// Provide temporary overlay object with log function until Qt's overlay.js loads
// This prevents errors from template's console.log override that runs immediately
window.overlay = window.overlay || {
log: function(message) {
originalConsoleLog('[Overlay]', message);
}
};
// Load Qt scripts when DOM is ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', window.loadQtScripts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment