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

[BUG] Blank video on youtube_player_iframe #1051

Open
1 task done
pansitwattana opened this issue Feb 14, 2025 · 0 comments
Open
1 task done

[BUG] Blank video on youtube_player_iframe #1051

pansitwattana opened this issue Feb 14, 2025 · 0 comments
Assignees

Comments

@pansitwattana
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Package

youtube_player_iframe (Default)

What happened?

After I update youtube_player_iframe to 5.2.1 -> one of my video id is blank
but when I downgrade to 4.0.0 -> It works fine

What is the expected behaviour?

Youtube should be render properly

How to reproduce?

  1. Flutter 3.27

could you please help analyze -> youtube that have only problem is https://www.youtube.com/watch?v=-77JlLItziA
other youtube can render properly

I initialed controller like this

YoutubePlayerController initialYoutubePlayerController(String youtubeId) {
  final controller = YoutubePlayerController.fromVideoId(
    videoId: youtubeId,
    params: const YoutubePlayerParams(
      showControls: true,
      showFullscreenButton: true,
      enableCaption: true,
      showVideoAnnotations: false,
      enableJavaScript: true,
      playsInline: false,
    ),
  );

  return controller;
}

render ui code

YoutubePlayerControllerProvider(
  controller: controller!,
  child: ClipRRect(
    borderRadius: BorderRadius.circular(10),
    child: YoutubePlayer(
      controller: controller!,
      gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{},
      aspectRatio: 16 / 9,
    ),
  ),
),

Flutter Doctor Output

[!] Flutter (Channel [user-branch], 3.27.4, on macOS 15.1.1 24B91 darwin-arm64, locale en-TH)
    ! Flutter version 3.27.4 on channel [user-branch] at /Users/geneusdna/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision d8a9f9a52e (13 days ago), 2025-01-31 16:07:18 -0500
    • Engine revision 82bd5b7209
    • Dart version 3.6.2
    • DevTools version 2.40.3
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/geneusdna/Library/Android/sdk
    • Platform android-35, build-tools 34.0.0
    • ANDROID_HOME = /Users/geneusdna/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.96.4)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.104.0

[✓] VS Code (version 1.83.0-insider)
    • VS Code at /Applications/Visual Studio Code - Insiders.app/Contents
    • Flutter extension version 3.72.0
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