Skip to content

1.7.0

Choose a tag to compare

@DaniKemper010 DaniKemper010 released this 19 Oct 21:50
· 75 commits to master since this release

Added

  • Posters and preview animations. NativeVideoPlayer(poster:) shows a
    custom thumbnail over the video until it plays, so a loading player is
    never a black box. After animationDelay (default 3 s) of looking at the
    unplayed video, an animated preview (GIF / animated WebP, e.g. highlights)
    fades in over it; animationDuration and repeatAnimation cycle it back
    to the still. A duration badge ("9:56", "LIVE") shows by default, from
    duration: until the player reports its own. Fit, alignment, fade,
    background, when it hides (onPlay / onLoaded), showing it again at the
    end (showOnCompleted), the badge (badgeBuilder) and anything on top
    (overlayBuilder, with the loading state) are all configurable.
  • Bunny Stream helpers. NativeVideoPlayerPoster.bunny(videoBaseUrl)
    uses the video's thumbnail.jpg and preview.webp (or .gif), and
    StoryboardThumbnails.bunny(videoBaseUrl:, duration:) its seek/_N.jpg
    scrub sprites (6×6 grids of 300 px frames, 2 s apart).
  • Live streams. isLive / isLiveStream tell a live HLS stream from
    VOD, seekToLiveEdge() jumps back to live, and liveEdgeOffset says how
    far behind live playback is. For a live stream duration is the DVR
    window and currentPosition and seekTo work within it, so a regular
    scrubber works as a DVR scrubber.
  • iOS: onPictureInPictureRestore, to open the video's screen from the
    PiP window.
    Called when the user taps the window's "back to app" button
    (not for exitPictureInPicture(), dispose() or the window's X). The
    window waits for the handler (at most 1.5 s) and then until a player of
    the controller is fully visible (at most 1 s more), and flies into it; the
    player a newly opened screen builds takes over the window. Also
    isPlayerFullyVisible, to skip navigating when the player already shows.
    A player under a pushed page or dialog, or whose route is still
    animating, no longer counts as fully visible, so the window also closes in
    place instead of flying over that page. Automatic PiP restores through the
    same path now.
  • Dart fullscreen grows out of the inline player. With a custom
    overlay, opening fullscreen no longer fades in: the video flies from the
    inline player to fullscreen (and back on close, also from where a swipe
    dismissed it) while the backdrop darkens, and keeps playing during the
    flight. iOS flies a
    short-lived engine texture of the shared player; Android flies the
    player's own texture, so it needs androidTextureMode (the Dart
    fullscreen host is then a texture too) and keeps the fade with platform
    views. The way back follows the inline player as the page relayouts
    (system bars return when it starts), and the inline slot stays empty
    until the video lands. Falls back to the fade when no frame can be
    captured or the screen rotates on the way in (lockToLandscape from
    portrait). NativeVideoPlayerController(fullscreenFlightBorderRadius:)
    sets the inline corners the flight rounds from and back to (default
    square).
  • Swipe down to close fullscreen, Instagram style. Once a downward drag
    starts, the video follows the finger (sideways too), shrinks, rounds its
    corners the further it is pulled down, and the background fades; the
    controls fade away. Letting go past 15% of the height, or flicking down,
    closes fullscreen: with a flight (above) the video flies back into the
    inline player from where it was let go, and the page underneath shows
    through while dragging, its inline slot left empty. Otherwise it springs
    back. The Dart fullscreen video is now sized to the
    video's own aspect-fit rect, so only the video moves, not a screen-sized
    black box.
  • NativeVideoPlayerController.capturePosterFrame() / posterFrame (iOS):
    a JPEG of the frame the player shows, from the item's video output.
  • Android: onPictureInPictureRestore on expand. Expanding the PiP
    window back into the app now calls the same handler, so one handler serves
    both platforms. Android's window is the whole activity, so the app comes
    back as it was (normally on the player's fullscreen) and nothing waits for
    the handler; it runs once the app is back, up to 3 s later on devices that
    report it only on the next touch. Closing the window with its X still
    pauses and does not call it.

Fixed

  • Android: remote videos fail in release builds of apps without the
    INTERNET permission.
    Flutter adds it to debug builds only, so a release
    build got "Source error" (getaddrinfo EPERM) for every stream. The
    plugin's manifest now declares it.
  • iOS: seeking in a live stream jumped to the start of its DVR window.
    Live positions are reported relative to the window, but seekTo took them
    as absolute stream times. The buffered position was absolute too.
  • Android: a live stream without a seekable window reported position 0.
    The position was offset by the window's wall-clock start time.
  • iOS: a tile scrolled back while its PiP window is open plays the video
    next to the window.
    Scrolling a feed tile far enough disposes its platform
    view; since 1.6.5 the native view is kept while its window is open, and
    scrolling back creates a new view for the same controller. That view got a
    surface of its own, so the tile played the video inline next to the PiP
    window, and closing the window sent it back to the old, off-screen surface.
    The new view now takes over the window and the surface it plays from: the
    tile shows the PiP placeholder, and closing the window returns it to the
    tile where it is now.
  • iOS: closing PiP over a tile that is not fully visible. AVKit flies the
    window to the player's whole frame and draws it above the app, so for a
    tile half under the app bar the video covered the app bar until the
    animation ended, and for a tile scrolled off screen it flew off screen. The
    window now only flies back into a player the widget reports as fully
    visible (no scroll view or clip cuts it). Otherwise it closes in place and
    the video plays on in the tile.
  • iOS: the video draws over the next page during a route transition.
    A page pushed over a playing (or paused) video could slide in underneath
    it: the native player view stayed on top of the incoming page until the
    transition ended. Seen on devices (iOS 27), not in the simulator. While
    another page route covers the player (animating over it or sitting on
    top, including a page pushed on an outer navigator above a tab shell),
    the platform view now leaves the scene and a still frame of the video is
    painted in its place; the live view returns once the page is gone.
    Dialogs and bottom sheets don't cover it. Texture tiles are unaffected.
  • Android: a page's video pops in and out at full size during route
    transitions.
    A hybrid-composition view ignores its route's fade and
    zoom, so it showed before its page had faded in and stayed until its page
    was gone. The native view is now created once its page has finished
    coming in and released as soon as a pop starts; black moves with the page
    meanwhile. Hybrid composition still flickers for a frame when views come
    and go; androidTextureMode (recommended for feeds) has none of this.