story_view icon indicating copy to clipboard operation
story_view copied to clipboard

How to set Progress bar duration according to my mp4 video duration. I am getting video from JSON API response.

Open hwasiq15 opened this issue 3 years ago • 1 comments

List<StoryItem> storyItems = [ StoryItem.pageVideo( item['video'], controller: StoryController(), ) ]; return Material( child: StoryView( storyItems: storyItems, onComplete: () { Navigator.pop(context); }, onVerticalSwipeComplete: (direction) { if (direction == Direction.down) { Navigator.pop(context); } }, controller: StoryController(), ), );

hwasiq15 avatar Sep 28 '21 09:09 hwasiq15

in video_player you can get the video file duration by listening to the video player stream

but you can also get the video duration from the api response from backend

himmat12 avatar Oct 07 '21 14:10 himmat12