Skip to main content

photo_manager_video_player 0.1.0 copy "photo_manager_video_player: ^0.1.0" to clipboard
photo_manager_video_player: ^0.1.0 copied to clipboard

Play photo_manager AssetEntity videos with zero copies of the original — MediaStore content URIs on Android, PhotoKit AVPlayerItems on Darwin.

0.1.0 #

  • AssetEntityVideoController, AssetEntityVideoValue, AssetEntityVideoView: play a photo_manager AssetEntity video without an app-managed copy or export of the original.
  • Android: MediaStore content:// URI → ExoPlayer, drawn into a Flutter texture through TextureRegistry.SurfaceProducer.
  • viewType: AssetEntityVideoViewType.platformView shows the video in a platform view instead — a SurfaceView on Android, an AVPlayerLayer on iOS — so HDR video keeps the system's HDR handling. The default stays textureView.
  • iOS: PHImageManager.requestPlayerItem → AVPlayer, drawn into a Flutter texture through AVPlayerItemVideoOutput.
  • Pauses in the background and resumes on return; a play() that would start in the background starts on return instead. dispose() completes once the platform player is released, even while it is being created. iOS raises an ambient audio session to .playback on the first player.
  • Flutter 3.29 or later; Swift Package Manager builds need Flutter 3.44.
  • AssetEntityVideoController(startPosition:): Android prepares the player at that position, so the first rendered frame is the one there instead of frame
    1. The initialized event now also reports the start position.
  • AssetEntityVideoFrames.mediaStoreThumbnailPosition: Android 8.1+ returns the position of the frame the MediaStore system thumbnail shows, or null, so a grid can hand that thumbnail over to playback without a jump.
  • AssetEntityVideoFrames.extract: JPEG stills at a list of times, read in place — AVAssetImageGenerator on iOS, MediaMetadataRetriever on Android.
0
likes
160
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

Play photo_manager AssetEntity videos with zero copies of the original — MediaStore content URIs on Android, PhotoKit AVPlayerItems on Darwin.

Repository (GitHub)
View/report issues

Topics

#photo-manager #video-player #video #gallery

License

Apache-2.0 (license)

Dependencies

flutter, photo_manager

More

Packages that depend on photo_manager_video_player

Packages that implement photo_manager_video_player