flutter_subtitle_wrapper icon indicating copy to clipboard operation
flutter_subtitle_wrapper copied to clipboard

Subtitle is not updating If video URL get updated runtime

Open pratik-7span opened this issue 3 years ago • 0 comments

Hey, @Joran-Dob Thanks for this library. I am working with Chewie Player. I am updating my URL based on resolution get changed.

But the problem is SubTitle didn't get updated after changing the URL.

My URL of the SRT file is the same. I am just changing the Video URL.

I am wrapping my VideoPlayer as below:

        Expanded(
              child: Center(
                child: _chewieController != null
                    ? SubTitleWrapper(
                        videoPlayerController: _chewieController!.videoPlayerController,
                        subtitleController: SubtitleController(
                            subtitleUrl: 'https://raw.githubusercontent.com/pratik7span/sample-srt/master/sample.srt',
                            subtitleType: SubtitleType.srt),
                        subtitleStyle: const SubtitleStyle(textColor: Colors.white, fontSize: 24, hasBorder: true),
                        videoChild: Chewie(
                          controller: _chewieController!,
                        ))
                    : Column(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: const [
                          CircularProgressIndicator(),
                          SizedBox(height: 20),
                          Text('Loading'),
                        ],
                      ),
              ),
            ),

Do let me know If you need any other details.

Your help would be appreciated.

pratik-7span avatar Sep 30 '21 10:09 pratik-7span