@bebranded/bb-contents 1.0.79-beta → 1.0.80-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bb-contents.js +12 -8
- package/package.json +1 -1
package/bb-contents.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* BeBranded Contents
|
|
3
3
|
* Contenus additionnels français pour Webflow
|
|
4
|
-
* @version 1.0.
|
|
4
|
+
* @version 1.0.80-beta
|
|
5
5
|
* @author BeBranded
|
|
6
6
|
* @license MIT
|
|
7
7
|
* @website https://www.bebranded.xyz
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
// Configuration
|
|
43
43
|
const config = {
|
|
44
|
-
version: '1.0.
|
|
44
|
+
version: '1.0.80-beta',
|
|
45
45
|
debug: true, // Debug activé pour diagnostic
|
|
46
46
|
prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
|
|
47
47
|
youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
|
|
@@ -414,29 +414,33 @@
|
|
|
414
414
|
};
|
|
415
415
|
});
|
|
416
416
|
|
|
417
|
-
//
|
|
418
|
-
let waitTimeout = 0;
|
|
419
|
-
const maxWaitTime = 3000; // 3 secondes max sur mobile
|
|
417
|
+
// SOLUTION SAFARI MOBILE SIMPLE : Attendre plus longtemps
|
|
420
418
|
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
|
|
421
|
-
|
|
422
419
|
console.log(`🔍 [MARQUEE] Safari - Mobile détecté: ${isMobile}`);
|
|
423
420
|
|
|
421
|
+
// Timeout plus long sur mobile pour laisser le temps aux images de se charger
|
|
422
|
+
const maxWaitTime = isMobile ? 5000 : 3000; // 5 secondes sur mobile
|
|
423
|
+
let waitTimeout = 0;
|
|
424
|
+
|
|
424
425
|
const waitForImages = () => {
|
|
425
426
|
waitTimeout += 100;
|
|
426
427
|
|
|
427
428
|
if (imagesLoaded >= totalImages || imagesLoaded === 0 || waitTimeout >= maxWaitTime) {
|
|
428
429
|
console.log(`✅ [MARQUEE] Safari - Images chargées: ${imagesLoaded}/${totalImages} (timeout: ${waitTimeout}ms)`);
|
|
429
430
|
|
|
430
|
-
// Attendre
|
|
431
|
+
// Attendre plus longtemps sur mobile pour le rendu visuel
|
|
432
|
+
const renderDelay = isMobile ? 1000 : 200;
|
|
431
433
|
setTimeout(() => {
|
|
432
434
|
console.log(`🖼️ [MARQUEE] Safari - Attente rendu visuel des images...`);
|
|
433
435
|
startSafariAnimation();
|
|
434
|
-
},
|
|
436
|
+
}, renderDelay);
|
|
435
437
|
} else {
|
|
436
438
|
setTimeout(waitForImages, 100);
|
|
437
439
|
}
|
|
438
440
|
};
|
|
439
441
|
|
|
442
|
+
waitForImages();
|
|
443
|
+
|
|
440
444
|
const startSafariAnimation = () => {
|
|
441
445
|
// Forcer le chargement des images restantes si timeout
|
|
442
446
|
if (waitTimeout >= maxWaitTime && imagesLoaded < totalImages) {
|