In a children's educational-video app's vertical feed of short clips, when should a clip start playing by itself, and when should it not?
answer
- visibility decides, not mere presence
- wait for the scroll to settle
- one active clip at a time
- muted until a tap
- settings and parents can veto it
basics
~20 sAutoplay only the one clip that is mostly on screen once scrolling settles, muted, and pause it when it leaves. Skip autoplay when a data-saving, battery-saving or reduce-motion setting, or a parent's choice, says no.
solid answer
~50 sI'd pick one *active* clip: the item with the largest visible fraction above a threshold, say 60 %, which is an assumption to tune, and only after the scroll has been still for a moment, so a flick past ten clips starts none of them. It plays muted and without taking the phone's audio from whatever else is playing; sound starts only on a tap. When it drops below the threshold it pauses and its player goes back to the shared pool. Autoplay is a default, not a right: it switches off when the user's data-saving setting is on, when battery saving is on or the battery is low, when an accessibility setting asks for less motion, and when a parent turns it off in the app. The feed then shows each clip's poster with a play button.
code
pseudocode · 22 lineson scroll settled or visibility changed:
if not autoplay_allowed():
pause(active); active = none
show_posters(on_screen_items)
return
best = on_screen_items.max_by(visible_fraction)
if active != none and active.visible_fraction >= 0.5:
return # hysteresis: keep the current clip
if best.visible_fraction < 0.6:
pause(active); active = none
return
if best != active:
pause(active)
active = best
play_muted(best)
autoplay_allowed():
return app_in_foreground
and not parent_settings.autoplay_off
and not system.data_saving_on
and not system.battery_saving_on
and not system.reduce_motion_ongo deeper
Recall the three rules: only the mostly visible clip plays, it plays muted, and it pauses when it scrolls away. Name two settings that switch autoplay off.
Explain how the active clip is chosen: a visible-fraction threshold, a settle delay so flicks start nothing, one active clip, and hysteresis so two half-visible clips do not flicker.
Present autoplay as one gate every video surface asks, fed by data-saving, battery, accessibility and parental settings, and say exactly what the child sees when the gate says no.
Treat autoplay as a product policy with an owner: defaults for a children's audience, thresholds tuned from watch data, and one rule shared by every feed in the app.
## What autoplay has to decide A **vertical feed** of short clips shows one or two items on screen at a time and lets the child swipe through dozens a minute. **Autoplay** means a clip starts without a tap. Every autoplay decision answers three questions at once: *which* clip plays, *how* it plays (sound or silence), and *whether* autoplay is allowed right now at all. In a children's educational-video app the stakes are concrete: a clip that starts with sound in a quiet car, a phone that runs hot on a long journey, and a parent who switched autoplay off and finds it running anyway. The scenario's assumptions, stated so the numbers below can be checked: clips last 20 to 90 seconds, one fills most of the screen, and the app runs on parents' phones of every age, including cheap ones. ## Which clip is the active one The rule is **one active clip**, chosen from visibility, not from what was bound last. 1. Measure each on-screen item's **visible fraction**, the share of its area inside the viewport, whenever the scroll position changes. 2. Wait until scrolling **settles** (velocity near zero, or still for roughly 200 to 300 ms, an assumption to tune) before choosing. A fast flick passes ten clips in a second; starting each would prepare players and fetch bytes for clips nobody watches. 3. Pick the item with the **largest** visible fraction, provided it is above a threshold such as 60 % (again an assumption). Ties go to the item nearer the top. 4. Apply **hysteresis**: the active clip keeps playing until it falls clearly below the threshold, not the instant a neighbour edges ahead, so small jitters do not flip playback back and forth. 5. When the active clip leaves, **pause** it and return its player to the pool; a paused off-screen player still holds a decoder and memory. Visibility is not a property set once when a cell is bound to its item. It changes with every frame of scroll, so it must be recomputed from the list's layout as it moves. ## Sound: muted by default Autoplayed clips start **muted**. Sound arriving without a tap surprises the family, and a muted feed clip should not claim the phone's audio from whatever is already playing, such as the car's music or a parent's call. A tap unmutes the active clip, and the app can remember that choice for the rest of the session. Muting changes nothing about decoding or downloading: the video is still decoded and the bytes are still fetched, which is why the rules below exist. ## When not to autoplay Autoplay is a **policy gate** every video surface asks before starting a clip. | Signal | What the feed does | Why | |---|---|---| | The user's data-saving setting is on | No autoplay; poster plus play button | The user has said bytes matter more than motion | | Battery saving is on, or the battery is low | No autoplay | Decoding video keeps the processor and screen busy | | An accessibility setting asks for less motion | No autoplay | Moving video is exactly what that setting asks to avoid | | A parent switched autoplay off in the app | No autoplay, on every surface | A parental choice must hold everywhere, not on one screen | | The app is not in the foreground | Nothing plays | No one is watching | The **cost** of each byte and radio wake-up, and how metered networks are detected, belong to the question on the phone's radio and data budget; this question keeps the **policy**: which signals veto autoplay and what the screen shows instead. ## What the child and the parent see instead - A clip that may not autoplay shows its **poster frame** and an obvious play button, so the feed still reads as video. - A tap always plays: the gate stops *automatic* playback, never playback the child asked for. - The parent's setting is visible and explains itself ("Videos start when tapped"). - When the gate reopens, for example on reaching home Wi-Fi with data saving off, autoplay resumes on the next settled scroll rather than starting the clip under the child's thumb. ## Where this stops How many upcoming clips are fetched ahead, and how a flick cancels that work, is the preload question. How many players exist and how one is bound to a recycled cell is the player-pool question. Decoding the poster image is the image-loading pipeline's job. This question owns the choice of the one clip that plays, its sound, and the vetoes.
- Why wait for the scroll to settle instead of starting whichever clip crosses the threshold?During a fast flick many clips cross the threshold for a fraction of a second each. Starting each would prepare players, open requests and decode first frames for clips nobody watches, wasting data and battery and churning the player pool. Waiting for low scroll velocity or a short still period, an assumption of roughly 200 to 300 ms, means only the clip the child stops on plays.
- Two clips are each about half visible; which one plays?Use one deterministic rule: the larger visible fraction wins, and a tie goes to the clip nearer the top. Add hysteresis, so the active clip keeps playing until it drops clearly below the threshold rather than the moment its neighbour edges ahead. Without both, small scroll jitters flip playback between the two clips.
- A clip should start the moment any part of it appears on screen.
- Visibility can be checked once, when the cell is bound to its clip.
- A muted clip saves the decoding and download cost of playing it.
- A paused clip that has scrolled away costs nothing, so its player can stay attached.
- The user's data-saving setting can be ignored for clips this short.