Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hwasiq15 opened this issue Sep 28, 2021 · 1 comment

Comments

@hwasiq15
Copy link

List 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 hwasiq15 changed the title How to Progress bar duration according to my mp4 video. I am getting video from JSON API response. How to set Progress bar duration according to my mp4 video. I am getting video from JSON API response. Sep 28, 2021
@hwasiq15 hwasiq15 changed the title How to set Progress bar duration according to my mp4 video. I am getting video from JSON API response. How to set Progress bar duration according to my mp4 video duration. I am getting video from JSON API response. Sep 28, 2021
@himmat12
Copy link

himmat12 commented Oct 7, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants