Add more logging to initialize() for debugging template loading

parent e9c30c8c
......@@ -89,10 +89,11 @@ class WebOverlayController {
*/
async initialize() {
if (this.initialized) {
console.log('[OverlayController] Already initialized, skipping');
return;
}
this.log('Initializing web overlay controller');
console.log('[OverlayController] Starting initialization...');
// Set up video event listeners for synchronization
if (this.videoElement) {
......@@ -105,7 +106,7 @@ class WebOverlayController {
// Set up message listener for iframe communication
window.addEventListener('message', this.onIframeMessage.bind(this));
this.log('Message listener set up for iframe communication');
console.log('[OverlayController] Message listener set up for iframe communication');
// Set up resize observer for overlay scaling
this.setupResizeObserver();
......@@ -117,13 +118,16 @@ class WebOverlayController {
this.startRealTimeUpdates();
// Load default template
console.log('[OverlayController] Loading default template...');
await this.loadTemplate('default');
console.log('[OverlayController] Default template loaded');
this.initialized = true;
this.log('Initialization complete');
console.log('[OverlayController] Initialization complete, loading template config...');
// Load template configuration and start rotation
await this.loadTemplateConfig();
console.log('[OverlayController] Template config loaded');
// Emit initialized event
this.emit('initialized');
......
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