                   setTimeout(() => {
                        switchToFrame(iframe, index);
                    }, 100);
                };

                iframe.onerror = function() {
                    console.error(`幻灯片 ${index + 1} 加载失败`);
                    loadingSlides.delete(index);
                    isTransitioning = false;
                    hideLoadingOverlay();
                };

                // 添加到容器
                document.getElementById('slideFrameContainer