playstack 0.1.0-dev.8
playstack: ^0.1.0-dev.8 copied to clipboard
Short-video feeds and native video playback for Flutter: a one-widget reels feed with replaceable controls, player pooling, preloading and lifecycle management.
0.1.0-dev.8 #
PlayStackDefaultControls.bufferingIndicatorandPlayStackBufferingIndicator.indicatorreplace the loading spinner, for example with an animation of the app.- Cinema mode:
PlayStackFeedView.cinemaMode(manual,fullscreenby default,always) andcinemaModeDelayhide the controls until the next tap;PlayStackFeedViewController.enterCinemaMode,exitCinemaMode,toggleCinemaMode;PlayStackFeedPage.isCinemaMode. - Screen lock:
PlayStackFeedViewController.lockScreen/unlockScreenignore touches, swipes, back and rotation until unlocked;screenLockBuilder, defaultPlayStackScreenLockOverlay;PlayStackFeedPage.isScreenLocked.PlayStackDefaultControlshides itself in both and shows cinema and lock buttons (showCinemaModeButton,showLockButton). - Picture quality:
PlayStackVideoQuality,PlayStackPlayerController.videoQualities,videoQualityandsetVideoQuality. A choice takes effect at once: Android selects the rendition, other engines reload the buffer in place. The default settings sheet lists the qualities. - Media controls:
PlayStackManager.mediaSession(PlayStackMediaSession) andPlayStackFeedView.mediaInfoshow a video on the lock screen, in the notification and in Control Center, with play, pause, seek and skip, and keep its sound playing in the background. - Picture-in-Picture:
PlayStackManager.pictureInPicture(PlayStackPictureInPicture),PlayStackFeedView.pictureInPictureandPlayStackFeedViewController.startPictureInPicture. - The lifecycle pause skips the video in the media controls and the video in an open Picture-in-Picture window.
PlayStackFeedView<T>: a complete feed screen in one widget. PassitemsandvideoUrl(and optionallyposterUrlandonLoadMore). The view creates and releases its players and handles paging, vertical or horizontal swiping (scrollDirection,reverse), transitions, loading more, poster precaching, fullscreen andautoAdvancewhen a video ends.controlsBuilderandvideoBuilderreceive a typedPlayStackFeedPage<T>.PlayStackFeedView.feedshows aPlayStackFeedManageryou manage yourself.PlayStackFeedViewController(aListenable) moves pages, switches fullscreen and sound, and exposes the feed and the manager. Fullscreen opens on its own route above the app's bars, built with the samecontrolsBuilder(page.isFullscreenis true there). Turning the device sideways opens fullscreen and upright closes it (fullscreenOnRotate, on by default), also in an app locked to portrait.PlayStackFullscreenManager.deviceOrientationChanges: how the user holds the device, from the motion sensors (Android, iOS).- Leaving fullscreen restores the orientations the app allowed before,
read from the platform;
PlayStackConfig.reels()no longer forces portrait (appOrientationssets a fixed list). PlayStackConfig.reels(),PlayStackConfig.screenQualityLimit()andPlayStackFeedConfig.reels: presets tuned for fast swiping, used byPlayStackFeedViewby default.PlayStackFeedTransition:slide,parallax,stack,fade,zoom,cube, orcustom. Transitions follow the finger and animate moves made from code.PlayStackDefaultControls: tap to pause, a feed-wide sound switch, a fullscreen button for landscape videos, a progress bar, a buffering indicator that appears only after a long wait, and retry. Its parts are public:PlayStackProgressBar,PlayStackBufferingIndicatorandPlayStackMuteButton.PlayStackFeedViewpauses while a route covers it or its tab is hidden (pauseWhenHidden), andPlayStackFeedViewController.pause/resumestop it under sheets and dialogs.PlayStackFeedView.onItemViewedreports each visit with aPlayStackItemView: watch time, duration, completion and the typed item.PlayStackFeedView.onRefreshturns on pull to refresh; off when null.- Series support:
PlayStackFeedView.startPosition,PlayStackFeedItem.startPosition,PlayStackPlayerController.startPositionandPlayStackManager.createController(startPosition:)prepare a video at a point;PlayStackItemView.positionreports where the user left;PlayStackFeedViewController.jumpToItem,animateToItemandindexOfItemmove to an item by your object. PlayStackDefaultControls: hold to pause or to play faster (holdAction,PlayStackHoldAction,holdSpeed), and a progress bar you can drag or tap to seek (seekable,PlayStackProgressBar.seekable,touchHeight).- Pages without video:
videoUrlorsourcemay return null, andPlayStackFeedView.pageBuilderbuilds those pages (ads, cards). They take no player and are never preloaded. A list inside a page scrolls first and hands the swipe to the feed at its end.PlayStackFeedItem.page,PlayStackFeedItem.isVideo,PlayStackFeedPage.cast. - Locked items:
PlayStackFeedView.isLockedandlockedBuilder,PlayStackFeedItem.locked,PlayStackFeedManager.setLocked. Locked videos are never prepared or played. PlayStackFeedPreloadandPlayStackFeedView.preloadedprepare a feed before its screen opens, for example on the splash screen.PlayStackDefaultControlsshows subtitles and a settings button with playback speed and subtitle tracks;PlayStackSubtitlesandPlayStackSettingsSheetare public.PlayStackDefaultControls.childsits above the gesture layer, so its buttons react at once instead of waiting for a possible double tap.PlayStackConfig.reels(looping: false). WithautoAdvancethe view's own manager no longer loops.PlayStackFeedItemtakes aposterand appdata.PlayStackFeedManagergainedsetMutedandmuted(feed-wide sound),itemAtandmanager.
0.1.0-dev.7 #
- Licensed under the MIT license.
- Milestone 7: example benchmark (
lib/benchmark, Benchmark page andintegration_test/benchmark_test.dart) measuring cold, preloaded and swipe start latency until playback advances, rapid feed scrolling and memory across native player create/dispose cycles. PlayStackPlayerMetrics.lastPreparationTimeis measured correctly when the engine renders the first frame before it reports the video ready (it equaledlastTimeToFirstFrameon Android).- Integration tests run on the web (headless Chromium) and report per-test results, so a run in which no test executed fails.
setSourcecancels a pending automatic retry of the previous source instead of waiting for its delay.- Every public member is documented (
public_member_api_docs); guides for every feature indocs/. - Package metadata (homepage, repository, issue tracker, topics) and aligned dependency constraints for publishing.
0.1.0-dev.6 #
- Milestone 6: disk cache (
PlayStackCacheConfig,PlayStackManager.cache), fullscreen with orientation restoration (PlayStackManager.fullscreen,PlayStackFullscreenConfig), audio configuration (PlayStackAudioConfig) andPlayStackPlayerController.interruptions, automatic retry (PlayStackRetryConfig) plusretry()andreinitialize(), retry of offline failures on reconnection.AsyncLockkeeps no future while idle (fixes a cross-zone deadlock on dispose).
0.1.0-dev.5 #
- Milestone 5:
PlayStackFeedManager(PlayStackManager.createFeed) with a preload window bounded by network, memory and pool size, ordered preloads after the active item, cancellation on scroll, stable item ids (insert/remove/replaceAll/updateSource), pause/resume andPlayStackFeedStats.PlayStackPlayerConfig.preloadBufferDuration,PlayStackManager.networkStatus,PlayStackPlayerController.metrics.release()cancels a preparation in flight; cancelled preparations return toidleinstead oferror.
0.1.0-dev.4 #
- Milestone 4: exclusive playback (
PlayStackConfig.exclusivePlayback,PlayStackManager.activeController), pool limit lowered and preparation retried once when a decoder cannot be allocated (PlayStackPoolConfig.adaptToDecoderFailures), memory pressure releasesbackgroundcontrollers, per-priority pool stats. Fixes a lease leak when a controller was disposed while its native player was being created.
0.1.0-dev.3 #
- Milestone 3: audio/video/subtitle tracks with subtitle text events, video
quality limits, metadata (frame rate, bitrate, codec, live),
setSource,stop,positions()stream, app lifecycle pause/resume.
0.1.0-dev.2 #
- Milestone 2: native playback (sources, play/pause/seek/loop, volume, speed,
first frame, rotation, typed errors),
clearSourcefor idle pooled players.
0.1.0-dev.1 #
- Milestone 1 foundation. Development preview; see the repository README for status.