-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement thumbnail image based video previews for Youtube & Vimeo video links, and inline video player preview using the video_player package for user uploaded videos. For user uploaded video, current implementation will fetch the metadata when the message containing the video comes into view. This metadata is used by the player to determine if video is supported on the device. If it isn't then there will be no preview, and tapping on the play button will open the video externally. If the video is supported, then the first frame of the video will be presented as a preview in the message container while tapping on the play button will start buffering and playing the video in the lightbox. There are still some quirks with the current implementation: - On iOS/macOS, there is a bug where whole video is downloaded before playing: flutter/flutter#126760 - On iOS/macOS, unlike on Android the first frame is not shown after initialization: flutter/flutter#139107 - Current implementation uses url_launcher for fallback in case video is not supported by video_player, we should switch to webview instead to correctly handle auth headers for private videos. Fixes #356
- Loading branch information
1 parent
106f783
commit b78af2f
Showing
3 changed files
with
466 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.