Joran-Dob / flutter_subtitle_wrapper

This is an subtitle package for flutter video player.
https://pub.dev/packages/subtitle_wrapper_package
MIT License
32 stars 62 forks source link

bug: Add legend not work in some videos #72

Closed rafaelqcosta closed 5 months ago

rafaelqcosta commented 2 years ago

Description After starting Chewie the user can activate the subtitles. In some videos the subtitles are ok, but in others they just don't appear.

This variable is false: final bool validStartTime = videoPlayerPosition.inMilliseconds > subtitleItem.startTime.inMilliseconds;

Steps To Reproduce

  1. Play Video
  2. Select legend
  3. Add legend on SubtitleController
  4. but de legend not appear

Expected Behavior understand why

Screenshots

image

code:

void _initSubtitle(String url, bool show) { subtitleController = SubtitleController( subtitleUrl: url, showSubtitles: show, subtitleType: SubtitleType.webvtt, subtitleDecoder: SubtitleDecoder.utf8, ); setState(() {}); }

@override Widget build(BuildContext context) { if (chewieController != null && playerController != null) { return Theme( data: Theme.of(context).copyWith( bottomSheetTheme: BottomSheetThemeData(backgroundColor: Colors.white), ), child: AspectRatio( aspectRatio: 16 / 9, child: SubtitleWrapper( videoPlayerController: playerController!, subtitleController: subtitleController, subtitleStyle: SubtitleStyle( textColor: Colors.white, hasBorder: true, position: SubtitlePosition(bottom: 10), ), videoChild: Chewie( controller: chewieController!, ), ), ), ); } return AspectRatio( aspectRatio: 16 / 9, child: ShimmerPlaceholderWidget( isRounded: false, width: double.infinity, higth: double.infinity, ), ); }

rafaelqcosta commented 2 years ago

I noticed that the time of videoPlayerPosition.inMilliseconds never change in some videos.

image image
Joran-Dob commented 1 year ago

Hi,

I overlooked this project for a bit! Trying to find some time this week to resolve some of the issues or provide some input. Thanks for the information 🚀

Joran-Dob commented 5 months ago

Not sure if this is still an problem for you, if so feel free to reopen!