feed library

短视频流入口:Feed、播放器池、预取端口、条目及播放器控制器。 播放器与通用播放类型由 mova.dart 提供。

Classes

IMovaFeedPrefetcher
Warms network/CDN state for an upcoming feed item before the viewer swipes to it.
IMovaGuardedFeedPrefetcher
可选的预取取消能力;不扩充原有 IMovaFeedPrefetcher 抽象成员。
MovaAvatarComponent
Author avatar; tapping the avatar fires MovaFeedItem.onAvatarTap, tapping the small follow badge beneath it fires MovaFeedItem.onFollowTap. mova holds no follow state of its own (see MovaFeedItem's doc comment) — the badge always renders, its actual meaning is the host's.
MovaCommentButtonComponent
Comment entry; display-only count from MovaFeedItem.commentCount, tap fires MovaFeedItem.onComment — mova owns no comment UI.
MovaFeed
Drives a MovaFeedPool through a vertical feed of MovaFeedItems (bilibili/douyin-style "swipe for next video"): the page the viewer is on plays on its own player while its neighbours are already opened and parked on theirs, so a swipe swaps between two live surfaces instead of tearing one down and rebuilding it.
MovaFeedInfoComponent
Bottom info block: author name and music/sound name, douyin-style.
MovaFeedItem
One playable entry in a MovaFeed-driven vertical feed (bilibili/douyin-style "swipe for next video").
MovaFeedPlayer
A vertical, douyin-style "swipe for next video" feed backed by a pool of players — one per warm page, rather than one shared by all.
MovaFeedPlayerCtrl
Host controls for one feed player; the widget owns its players while the host owns this controller. Queries return null and commands do nothing while detached. Example: await ctrl.pause().
MovaFeedPool
A fixed-size pool of players that a vertical feed swaps between, so each page owns its own decoder and render surface instead of every page sharing one.
MovaFeedSlot
A pool player currently bound to one feed index, plus whether its media has finished opening.
MovaLikeButtonComponent
Like button; toggles MovaFeed's local like state end to end (icon + count + heart-fill) and stays in sync with double-tap-to-like on the gesture layer via the shared likeNotifier.
MovaNetworkWarmFeedPrefetcher
The default IMovaFeedPrefetcher: opens a ranged HTTP GET for the first rangeBytes of MovaSource.uri and discards the response.
MovaShareButtonComponent
Share entry; display-only count from MovaFeedItem.shareCount, tap fires MovaFeedItem.onShare — mova owns no share sheet.
MovaSocialRailComponent
Right-side social action rail (avatar/follow, like, comment, share), bilibili/douyin-style. A pure grouping composite — every child renders itself; this only lays them out in a column.

Functions

movaFeedWindow(int center, int size) → List<int>
Returns the feed indices worth keeping bound for a viewer sitting on center, for a pool holding size players.

Typedefs

MovaFactory = IMovaApi Function()
Creates one fully-wired player for MovaFeedPool to own.
MovaFeedErrorBuilder = Widget Function(BuildContext context, int index, Object error, VoidCallback retry)
构建单页失败界面;retry 仅重试该页,不影响相邻条目。
MovaFeedHolderBuilder = Widget Function(BuildContext context, MovaFeedItem item)
Builds what a feed page shows while its video is not yet on screen — the gap between the page mounting and its pooled player finishing open().
MovaFeedLikeChange = void Function(bool liked, int likeCount)
Called after a like toggle commits locally, so the host can persist it (e.g. call an API) — mova never calls a backend itself and never rolls the local toggle back regardless of what the host does with it.
MovaFeedLoader = Future<MovaFeedItem?> Function(int index)
Resolves the feed item at index, or null to signal the feed ends there (no more items past this point).