Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

White padding/line below the youtube player #18

Closed
engineerdeep opened this issue Mar 27, 2021 · 8 comments · Fixed by #19
Closed

White padding/line below the youtube player #18

engineerdeep opened this issue Mar 27, 2021 · 8 comments · Fixed by #19
Assignees
Labels
bug Something isn't working

Comments

@engineerdeep
Copy link
Contributor

Describe the bug
The player has a white padding/white line underneath it. It's not visible unless you add a container below it as shown in the screenshot. When the list view containing the video is scrolled the white line flickers alot.

To Reproduce:
Steps to reproduce the behavior:
Add a video inside a listview, add a container below it.

Expected behavior:
There should be no white line/ padding below it.

Screenshot:
image

@engineerdeep engineerdeep added the bug Something isn't working label Mar 27, 2021
@ghost
Copy link

ghost commented Mar 27, 2021

Hello! It doesn't seem like we have quite enough information to send this to a human yet to help out. We would love if you could provide more details about your issue by following the template without modifying any of the pre-filled text.

@jonafeucht jonafeucht mentioned this issue Mar 27, 2021
@jonafeucht
Copy link
Owner

Should be fixed now.

Could you please check? youtube_plyr_iframe: ^2.0.2

@jonafeucht jonafeucht linked a pull request Mar 27, 2021 that will close this issue
@engineerdeep
Copy link
Contributor Author

engineerdeep commented Mar 27, 2021

Hey, thank you for the prompt response. I tried 2.0.2 but it still has the same issue.
image

Was this line supposed to be the fix for it?
https://github.com/jonatadashi/youtube_plyr_iframe/blob/eede8c52df7b342e5543577e833d2a1bc2c71fc9/lib/youtube_plyr_iframe.dart#L51

flutter doctor -v [✓] Flutter (Channel stable, 2.0.3, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-US) • Flutter version 2.0.3 at /Users/deepashok/Documents/programming/flutter/flutter • Framework revision 4d7946a68d (9 days ago), 2021-03-18 17:24:33 -0700 • Engine revision 3459eb2436 • Dart version 2.12.2

[!] Android toolchain - develop for Android devices (Android SDK
version 30.0.2)
• Android SDK at /Users/deepashok/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/deepashok/Library/Android/sdk
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK
licenses.
See
https://flutter.dev/docs/get-started/install/macos#android-set
up for more details.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1

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

[✓] Android Studio (version 4.1)
• 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
1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (2 available)
• iPhone SE (2nd generation) (mobile) •
E8B1E26A-7D92-4F8F-9F02-4EE6B4093442 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web) • chrome
• web-javascript • Google Chrome 89.0.4389.90

! Doctor found issues in 1 category.

@jonafeucht
Copy link
Owner

The aspectRatio was only for testing purposes, has been reverted.

I've tested on both the simulator and the web and can't seem to reproduce.

Could you paste reproducible code.

@engineerdeep
Copy link
Contributor Author

engineerdeep commented Mar 28, 2021

Oh, I could pretty easily reproduce it. Using youtube_plyr_iframe: ^2.0.2

Here's the code for it -

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String videoID = "sG4cou_LSBo";
  YoutubePlayerController _controller;

  @override
  Widget build(BuildContext context) {
    _controller = YoutubePlayerController(
      initialVideoId: videoID,
      params: const YoutubePlayerParams(
        enableCaption: false,
        enableJavaScript: false,
        showControls: true,
        showFullscreenButton: false,
        desktopMode: true,
        playsInline: true,
        showVideoAnnotations: false,
      ),
    );
    return Scaffold(
      appBar: AppBar(
        title: Text('Youtube Sample'),
      ),
      body: Column(
        children: [
          YoutubePlayerIFrame(
            controller: _controller,
            aspectRatio: 16 / 9,
          ),
          Container(
            height: 100.0,
            color: Colors.black,
          ),
        ],
      ),
    );
  }
}

image

@jonafeucht jonafeucht reopened this Mar 28, 2021
Repository owner deleted a comment Mar 28, 2021
@jonafeucht
Copy link
Owner

jonafeucht commented Mar 28, 2021

Alright, should be fixed now.
Please check: youtube_plyr_iframe: ^2.0.3-rc.2

Simulator Screen Shot - iPhone 12 - 2021-03-28 at 19 02 30

@engineerdeep
Copy link
Contributor Author

engineerdeep commented Mar 28, 2021

Wow, that was such a prompt response! Thank you SO much!

I'm so sorry to nitpick, but there's still a veeeryy slight white line visible, it would be okay if it was there but it still flickers when I scroll so it gets visible. I'm not sure why it's not visible in the screenshot you attached, please check the screenshot below:

image

@engineerdeep
Copy link
Contributor Author

engineerdeep commented Mar 28, 2021

Found the issue, this fixes it -

Container(
      decoration: BoxDecoration(
        border: Border.all(
            width: 0, color: Colors.black),
        color: Colors.black,
      ),
      child: InAppWebView...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants