sarbagyastha / youtube_player_flutter

A Flutter plugin for inline playback or streaming of YouTube videos using the official iFrame Player API.
https://youtube.sarbagyastha.com.np
BSD 3-Clause "New" or "Revised" License
699 stars 807 forks source link

[BUG] enableCaption flag not working #964

Open remyafong opened 2 months ago

remyafong commented 2 months ago

Is there an existing issue for this?

Package

youtube_player_flutter

What happened?

I'm trying to hide captions by setting the enableCaption flag to false when initializing my YoutubePlayerController, but it's not working. I've also tried setting captionLanguage to an empty string or a different language the video doesn't have captions, but that doesn't work either.

What is the expected behaviour?

Setting the enableCaption flag to false should hide captions.

How to reproduce?

YoutubePlayerController = YoutubePlayerController(
      initialVideoId: VIDEO_ID,
      flags: YoutubePlayerFlags(
        enableCaption: false,
      ),
    );

Flutter Doctor Output

No response

prateekmedia commented 1 day ago

I am able to replicate the issue, @sarbagyastha Do you have any solution for this?

prateekmedia commented 1 day ago

This is duplicate of: https://github.com/sarbagyastha/youtube_player_flutter/issues/448