Stories: a tap pauses a story whose camera move stopped on the press

A camera move the scene drives frame by frame (an authored move, or a
flight resumed partway) stops the run on pointerdown, so the story read
as stopped when the tap ended and the tap played it again. The tap now
goes by whether the story was playing when it began.
This commit is contained in:
Sameh Khamis committed 2026-11-16 14:00:09 -08:00
1 parent 8f2155d6c7
commit 807e872731
2 files changed
+32 -1

No files matched your search

+6 -1
View File
@@ -743,8 +743,13 @@ export function createStoriesController({
// the picked story; on a phone, touching the map drops the context sheet
// back to its peek.
let downAt = null;
// Whether the story was playing when the tap began: a camera move the
// scene drives frame by frame stops on the press itself, before the tap
// ends, and that tap still means pause.
let playingAtDown = false;
const onDown = (e) => {
downAt = [e.clientX, e.clientY];
playingAtDown = store.playback.playing;
if (store.mode === 'story' && innerWidth <= 720 && store.sheet !== 'peek')
store.sheet = 'peek';
};
@@ -758,7 +763,7 @@ export function createStoriesController({
return;
}
if (store.mode !== 'story' || !player) return;
if (store.playback.playing) {
if (playingAtDown || store.playback.playing) {
player.pause();
store.bigPlay = true;
} else player.play();