pod_player
pod_player copied to clipboard
Captions (ClosedCaptionFile) not working
Hi,
Thank you so much for creating this package. Of all the the YouTube packages, I love this the most.
But I have issue with captions. I am adding a .srt
caption file to the video, but it is not showing up.
This is how i have implemented it
@override
void initState() {
_controller = PodPlayerController(
playVideoFrom: PlayVideoFrom.youtube(
widget.videoUrl,
closedCaptionFile: _loadCaptions(),
videoPlayerOptions: VideoPlayerOptions(
mixWithOthers: true,
),
),
podPlayerConfig: const PodPlayerConfig(
videoQualityPriority: [1080, 720],
),
)..initialise();
super.initState();
}
Future<ClosedCaptionFile> _loadCaptions() async {
final String fileContents =
await DefaultAssetBundle.of(context).loadString('assets/captions/initiation_video.srt');
return SubRipCaptionFile(fileContents);
}
Using pod_player: 0.1.0 flutter: 3.3.4
Please also if possible implement, an auto-generated captions for videos.