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

Bottom Bar Time is Not Show and Popup is Cut #1090

Open yingjinWong opened 11 months ago

yingjinWong commented 11 months ago

dialog is cut

  1. First issue When config player view with layout_marginHorizontal 20 dp, the dialog is cut and not showed fully. How to handle this issue? why dialog can not be adjusted itself to make sure show completely?

       <com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.YouTubePlayerView
        android:layout_width="0dp"
        android:layout_height="@dimen/adapt_y188"
        android:layout_marginHorizontal="20dp"
        app:autoPlay="false"
        app:enableAutomaticInitialization="false"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toBottomOf="@id/item_magazine_section_img_caption"
        app:layout_goneMarginTop="@dimen/adapt_y8"/>
  2. Second issue Time and duration can not be show except full screen with landscape. How to make sure time and duration showed in portrait orientation and keep youtube controller icon (click to show dialog in first issue)at the same time.

time and duration not showed

Please help me out, thanks.

PierfrancescoSoffritti commented 11 months ago

I don't think the sample app has these problems? I think your player is too small. The library does not control the UI rendered in the player.

yingjinWong commented 11 months ago

the player width and height is not big enough to ensure to show those elements. is it possible to show those element when player is not in full screen, which is designer requirement?

yingjinWong commented 11 months ago

Like make font size smaller or icon smaller, or hide text after mute icon. Can you give some tips where can i adjust it?

billdizl commented 11 months ago

text

Like make font size smaller or icon smaller, or hide text after mute icon. Can you give some tips where can i adjust it?

小伙子,@PierfrancescoSoffritti 说了,他说他不认为这个库有问题,因为这个库不控制UI.我给你一个建议是 自定义实现UI,可以参考库的demo,加油小伙子

yingjinWong commented 11 months ago

@billdizl 谢谢你的提议,custom ui 的可以保留youtube icon 么?我看了demo没有这个属性view配置。但是我不是小伙子啊🤣

billdizl commented 11 months ago

@billdizl 谢谢你的提议,custom ui 的可以保留youtube icon 么?我看了demo没有这个属性view配置。但是我不是小伙子啊🤣

可以,我都已经实现了 ,只是我实现的比较简单而已,主要我是用在recyclyview列表播放的,类似中国的淘宝,京东,今日头条列表播放视频的

billdizl commented 11 months ago

注意下 这个youtube lib库存在内存泄漏问题,非常严重

billdizl commented 11 months ago

但是经过本宝的修改已经修复了这个问题,目前在我的项目中运行良好

yingjinWong commented 11 months ago

@billdizl 谢谢你的提议,custom ui 的可以保留youtube icon 么?我看了demo没有这个属性view配置。但是我不是小伙子啊🤣

可以,我都已经实现了 ,只是我实现的比较简单而已,主要我是用在recyclyview列表播放的,类似中国的淘宝,京东,今日头条列表播放视频的

可以上传demo file 参考下么?谢谢

billdizl commented 11 months ago

谢谢

仓库中已经有demo 可以参考 只是不全,样式很丑,需要自己改,其实这个仓库就是个webview加载的youtube链接,通过js调用来实现的,有时间可以研究下

PierfrancescoSoffritti commented 11 months ago

I don't speak Chinese, can this issue be closed?

billdizl commented 11 months ago

@yingjinWong 解决了吗,解决了 就可以关闭此问题了~嗷嗷叫~