Add more logging to initialize() for debugging template loading

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