mirror of
https://github.com/SoPat712/maisie-heardle.git
synced 2025-08-21 18:28:45 -04:00
Removed dependency, attempted fix
This commit is contained in:
@@ -29,14 +29,13 @@
|
|||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
"svelte": "^5.0.0",
|
"svelte": "^5.0.0",
|
||||||
"svelte-check": "^4.0.0",
|
"svelte-check": "^4.0.0",
|
||||||
"svelte-hero-icons": "^5.2.0",
|
|
||||||
"tailwindcss": "^4.0.0",
|
"tailwindcss": "^4.0.0",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.0.0",
|
||||||
"typescript-eslint": "^8.20.0",
|
"typescript-eslint": "^8.20.0",
|
||||||
"vite": "^6.2.5"
|
"vite": "^6.2.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tarekraafat/autocomplete.js": "^10.2.9",
|
"moment": "^2.30.1",
|
||||||
"moment": "^2.30.1"
|
"svelte-hero-icons": "^5.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -232,23 +232,21 @@
|
|||||||
countdownInterval = setInterval(updateTime, 1000);
|
countdownInterval = setInterval(updateTime, 1000);
|
||||||
|
|
||||||
widget = SC.Widget(iframeElement);
|
widget = SC.Widget(iframeElement);
|
||||||
// wait for full page load (or you could just use setTimeout)
|
widget.bind(SC.Widget.Events.READY, () => {
|
||||||
window.addEventListener('load', () => {
|
// grab duration & artwork
|
||||||
widget.bind(SC.Widget.Events.READY, () => {
|
widget.getDuration((d: number) => (fullDuration = d));
|
||||||
widget.getDuration((d: number) => (fullDuration = d));
|
widget.getCurrentSound((sound: any) => {
|
||||||
widget.getCurrentSound((sound: any) => {
|
artworkUrl = sound.artwork_url || '';
|
||||||
artworkUrl = sound.artwork_url || '';
|
|
||||||
});
|
|
||||||
|
|
||||||
// give SC widget 2s to settle on Netlify before probing
|
|
||||||
setTimeout(() => {
|
|
||||||
widget.play();
|
|
||||||
widget.pause();
|
|
||||||
widget.seekTo(0);
|
|
||||||
loading = false;
|
|
||||||
widgetReady = true;
|
|
||||||
}, 2000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// small delay for Netlify, then probe the player
|
||||||
|
setTimeout(() => {
|
||||||
|
widget.play();
|
||||||
|
widget.pause();
|
||||||
|
widget.seekTo(0);
|
||||||
|
loading = false;
|
||||||
|
widgetReady = true;
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
widget.bind(SC.Widget.Events.PLAY, () => {
|
widget.bind(SC.Widget.Events.PLAY, () => {
|
||||||
|
Reference in New Issue
Block a user