{"id":3333,"date":"2026-05-25T08:06:50","date_gmt":"2026-05-25T08:06:50","guid":{"rendered":"https:\/\/www.myrobots.fr\/?page_id=3333"},"modified":"2026-05-25T08:32:50","modified_gmt":"2026-05-25T08:32:50","slug":"diaporama-live","status":"publish","type":"page","link":"https:\/\/www.myrobots.fr\/","title":{"rendered":"Diaporama live"},"content":{"rendered":"\n    <div id=\"seb-app\">\n        <div id=\"seb-new-badge\">NOUVEAU<\/div>\n        <canvas id=\"seb-confetti-canvas\"><\/canvas>\n        <img decoding=\"async\" id=\"seb-slide\" src=\"\" alt=\"Slideshow\" style=\"display:none;\">\n    <\/div>\n\n    <style>\n        html, body {\n            margin: 0;\n            padding: 0;\n            width: 100%;\n            height: 100%;\n            overflow: hidden;\n            background: #000;\n        }\n\n        header, footer, nav, .site-header, .site-footer, #wpadminbar {\n            display: none !important;\n        }\n\n        #seb-app {\n            position: fixed;\n            inset: 0;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            background: #000;\n            z-index: 999999 !important;\n        }\n\n        #seb-slide {\n            max-width: 100vw;\n            max-height: 100vh;\n            width: auto;\n            height: auto;\n            object-fit: contain; \n            transition: opacity 0.3s ease-in-out;\n        }\n\n        #seb-new-badge {\n            position: absolute;\n            top: 40px;\n            right: -50px;\n            background: #ff0000;\n            color: white;\n            padding: 10px 60px;\n            font-family: 'Arial Black', sans-serif;\n            font-size: 1.5rem;\n            transform: rotate(45deg);\n            box-shadow: 0 0 15px rgba(0,0,0,0.5);\n            z-index: 1000000;\n            display: none;\n        }\n\n        #seb-confetti-canvas {\n            position: absolute;\n            inset: 0;\n            width: 100%;\n            height: 100%;\n            pointer-events: none;\n            z-index: 99999;\n        }\n    <\/style>\n\n    <script>\n        let images = [\"https:\\\/\\\/www.myrobots.fr\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/4kqrcode-scaled.jpg\",\"https:\\\/\\\/www.myrobots.fr\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/up4k-scaled.jpg\"];\n        let i = 0;\n        let timer = null;\n        const ajaxUrl = \"https:\/\/www.myrobots.fr\/wp-admin\/admin-ajax.php\";\n        \n        const img = document.getElementById(\"seb-slide\");\n        const badge = document.getElementById(\"seb-new-badge\");\n        \n        const canvas = document.getElementById(\"seb-confetti-canvas\");\n        const ctx = canvas.getContext(\"2d\");\n        let confettiArray = [];\n        let animationFrameId = null;\n\n        function resizeCanvas() {\n            canvas.width = window.innerWidth;\n            canvas.height = window.innerHeight;\n        }\n        window.addEventListener('resize', resizeCanvas);\n        resizeCanvas();\n\n        function createConfetti() {\n            confettiArray = [];\n            const colors = ['#ff0055', '#00ffcc', '#ffcc00', '#ff6600', '#9900ff', '#33ff33', '#0066ff', '#ff00ff'];\n            \/\/ Augmentation \u00e0 180 confettis pour une pluie bien dense\n            for (let i = 0; i < 180; i++) {\n                confettiArray.push({\n                    x: Math.random() * canvas.width,\n                    y: Math.random() * canvas.height - canvas.height - 20,\n                    radius: Math.random() * 5 + 4, \/\/ Taille des ronds (rayon)\n                    color: colors[Math.floor(Math.random() * colors.length)],\n                    speed: Math.random() * 3 + 2,\n                    wobble: Math.random() * 10,\n                    wobbleSpeed: Math.random() * 0.05 + 0.02\n                });\n            }\n        }\n\n        function animateConfetti() {\n            ctx.clearRect(0, 0, canvas.width, canvas.height);\n            let stillFalling = false;\n\n            confettiArray.forEach((p) => {\n                p.y += p.speed;\n                p.wobble += p.wobbleSpeed;\n                p.x += Math.sin(p.wobble) * 0.6; \/\/ Balancement horizontal\n\n                \/\/ Dessin d'un rond parfait\n                ctx.beginPath();\n                ctx.arc(p.x, p.y, p.radius, 0, Math.PI * 2);\n                ctx.fillStyle = p.color;\n                ctx.fill();\n\n                if (p.y < canvas.height + 20) stillFalling = true;\n            });\n\n            if (stillFalling) {\n                animationFrameId = requestAnimationFrame(animateConfetti);\n            } else {\n                ctx.clearRect(0, 0, canvas.width, canvas.height);\n            }\n        }\n\n        function startConfetti() {\n            stopConfetti();\n            createConfetti();\n            animateConfetti();\n        }\n\n        function stopConfetti() {\n            if (animationFrameId) cancelAnimationFrame(animationFrameId);\n            ctx.clearRect(0, 0, canvas.width, canvas.height);\n            confettiArray = [];\n        }\n\n        function changeSlide() {\n            if (timer) clearTimeout(timer);\n\n            if (!images || images.length === 0) {\n                img.style.display = \"none\";\n                badge.style.display = \"none\";\n                stopConfetti();\n                timer = setTimeout(refreshImages, 3000);\n                return;\n            }\n\n            img.style.display = \"block\";\n            img.src = images[i];\n\n            let duration = 4000; \n            \n            if (i === 0) {\n                badge.style.display = \"block\";\n                startConfetti(); \n                duration = 8000; \n            } else {\n                badge.style.display = \"none\";\n                stopConfetti();  \n            }\n\n            timer = setTimeout(() => {\n                i = (i + 1) % images.length;\n                changeSlide();\n            }, duration);\n        }\n\n        changeSlide();\n\n        \/\/ REFRESH LIVE\n        async function refreshImages() {\n            try {\n                const response = await fetch(`${ajaxUrl}?action=seb_get_slides`);\n                if (!response.ok) return;\n                \n                const newImages = await response.json();\n\n                if (newImages && newImages.length > 0) {\n                    if (images.length === 0 || newImages[0] !== images[0]) {\n                        console.log(\"\ud83d\udcf8 LIVE : Nouvelle image !\");\n                        images = newImages;\n                        i = 0; \n                        changeSlide();\n                    } \n                    else if (JSON.stringify(newImages) !== JSON.stringify(images)) {\n                        images = newImages;\n                        if (i >= images.length) i = 0;\n                        changeSlide();\n                    }\n                }\n            } catch (e) { \n                console.error(\"Erreur synchro :\", e); \n            }\n        }\n        \n        setInterval(refreshImages, 3000);\n    <\/script>\n\n    \n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-3333","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Diaporama live - MyRobots<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Diaporama live - MyRobots\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.myrobots.fr\/\" \/>\n<meta property=\"og:site_name\" content=\"MyRobots\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-25T08:32:50+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/\",\"url\":\"https:\\\/\\\/www.myrobots.fr\\\/\",\"name\":\"Diaporama live - MyRobots\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/#website\"},\"datePublished\":\"2026-05-25T08:06:50+00:00\",\"dateModified\":\"2026-05-25T08:32:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.myrobots.fr\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.myrobots.fr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Diaporama live\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/#website\",\"url\":\"https:\\\/\\\/www.myrobots.fr\\\/\",\"name\":\"MyRobots\",\"description\":\"Explorer. Comparer. Personnaliser.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.myrobots.fr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/#organization\",\"name\":\"MyRobots\",\"url\":\"https:\\\/\\\/www.myrobots.fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.myrobots.fr\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Gemini_Generated_Image_kmuxfhkmuxfhkmux.png\",\"contentUrl\":\"https:\\\/\\\/www.myrobots.fr\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Gemini_Generated_Image_kmuxfhkmuxfhkmux.png\",\"width\":2048,\"height\":2048,\"caption\":\"MyRobots\"},\"image\":{\"@id\":\"https:\\\/\\\/www.myrobots.fr\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Diaporama live - MyRobots","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"fr_FR","og_type":"article","og_title":"Diaporama live - MyRobots","og_url":"https:\/\/www.myrobots.fr\/","og_site_name":"MyRobots","article_modified_time":"2026-05-25T08:32:50+00:00","twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.myrobots.fr\/","url":"https:\/\/www.myrobots.fr\/","name":"Diaporama live - MyRobots","isPartOf":{"@id":"https:\/\/www.myrobots.fr\/#website"},"datePublished":"2026-05-25T08:06:50+00:00","dateModified":"2026-05-25T08:32:50+00:00","breadcrumb":{"@id":"https:\/\/www.myrobots.fr\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.myrobots.fr\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.myrobots.fr\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.myrobots.fr\/"},{"@type":"ListItem","position":2,"name":"Diaporama live"}]},{"@type":"WebSite","@id":"https:\/\/www.myrobots.fr\/#website","url":"https:\/\/www.myrobots.fr\/","name":"MyRobots","description":"Explorer. Comparer. Personnaliser.","publisher":{"@id":"https:\/\/www.myrobots.fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.myrobots.fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.myrobots.fr\/#organization","name":"MyRobots","url":"https:\/\/www.myrobots.fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.myrobots.fr\/#\/schema\/logo\/image\/","url":"https:\/\/www.myrobots.fr\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_kmuxfhkmuxfhkmux.png","contentUrl":"https:\/\/www.myrobots.fr\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_kmuxfhkmuxfhkmux.png","width":2048,"height":2048,"caption":"MyRobots"},"image":{"@id":"https:\/\/www.myrobots.fr\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.myrobots.fr\/index.php\/wp-json\/wp\/v2\/pages\/3333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myrobots.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.myrobots.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.myrobots.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myrobots.fr\/index.php\/wp-json\/wp\/v2\/comments?post=3333"}],"version-history":[{"count":17,"href":"https:\/\/www.myrobots.fr\/index.php\/wp-json\/wp\/v2\/pages\/3333\/revisions"}],"predecessor-version":[{"id":3358,"href":"https:\/\/www.myrobots.fr\/index.php\/wp-json\/wp\/v2\/pages\/3333\/revisions\/3358"}],"wp:attachment":[{"href":"https:\/\/www.myrobots.fr\/index.php\/wp-json\/wp\/v2\/media?parent=3333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}