PierfrancescoSoffritti / android-youtube-player

YouTube Player library for Android and Chromecast, stable and customizable.
https://pierfrancescosoffritti.github.io/android-youtube-player/
MIT License
3.44k stars 765 forks source link

Scroll and Seekbar issue when using viewPager2 horizontally #1156

Closed berkayertan closed 2 months ago

berkayertan commented 4 months ago

I'm trying to use horizontal viewpager but when i press the seekbar and try to move forward the video duration it's scrolling the video and also viewpager sample app has the same issue. How can i solve this ?

Serkali-sudo commented 4 months ago

I think easiest way to fix it is using the custom-ui. Custom ui uses native android views and it works well with viewpager when it comes to scrolling.

BerkayErtann commented 4 months ago

@Serkali-sudo Thanks i think best way is the custom ui like u said.

PierfrancescoSoffritti commented 4 months ago

You could also prevent clicks from reaching the player while scrolling.

Gudauu commented 2 months ago

You could also prevent clicks from reaching the player while scrolling.

Could you provide more intel on how to achieve this?

PierfrancescoSoffritti commented 2 months ago

I think the sample app has a similar solution for recycler view. You can look at that for reference.