summaryrefslogtreecommitdiff
path: root/src/views/Intro.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/Intro.js')
-rw-r--r--src/views/Intro.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/views/Intro.js b/src/views/Intro.js
index 3a20cde..72a53a4 100644
--- a/src/views/Intro.js
+++ b/src/views/Intro.js
@@ -25,11 +25,24 @@ export default function Intro({ onComplete }) {
} catch (error) {
console.error(error);
}
- footprint("egress");
setDone(true);
setTimeout(() => {
onComplete();
}, 200);
+ footprint("escape");
+ }, []);
+
+ const handleEnd = useCallback(() => {
+ try {
+ audio.play();
+ } catch (error) {
+ console.error(error);
+ }
+ setDone(true);
+ setTimeout(() => {
+ onComplete();
+ }, 200);
+ footprint("egress");
}, []);
const handleStart = useCallback(() => {
@@ -40,10 +53,10 @@ export default function Intro({ onComplete }) {
console.error(error);
}
setStarted(true);
- footprint("ingress");
if (player) {
player.play();
}
+ footprint("ingress");
}, [player]);
const handleReady = useCallback((player) => {
@@ -66,7 +79,7 @@ export default function Intro({ onComplete }) {
muted={false}
volume={1}
onReady={handleReady}
- onEnd={handleClose}
+ onEnd={handleEnd}
/>
<div
style={{ backgroundImage: "url(assets/img/no6092start.jpg)" }}