Problem
Design the frontend for a video streaming app: browse/discover content, watch videos with adaptive playback, and continue watching.
Discussion areas
- Requirements: home rows/carousels, search, video player, recommendations, resume playback, watch history.
- Discovery UI: horizontally scrollable rows, lazy-load rows on scroll, image-heavy cards (CDN, responsive images, placeholders/skeletons).
- Player: adaptive bitrate streaming (HLS/DASH via MSE), buffering strategy, quality switching, captions, keyboard/media-key controls, picture-in-picture.
- Data: paginated catalog, prefetch metadata on hover, normalized cache.
- Performance: route-based code splitting, prefetch the player bundle, preconnect to CDN, virtualization for long grids.
- State: playback position persistence (resume), per-profile state.
- Resilience: offline downloads (advanced), network-aware quality, error recovery.