简体   繁体   English

如何在exoplayer上设置菜单时间弹出时间?

[英]How to set menu time pop up time on exoplayer?

With the Android Exoplayer, when you tap on the screen it brings up the seekbar and some custom buttons I've coded overlayed on top of the video. 使用Android Exoplayer,当您点击屏幕时,它会调出搜索栏和一些我编码的自定义按钮,这些按钮叠加在视频上方。 Is there an attribute to set for how long that menu stays on the screen? 是否有一个属性可以设置该菜单在屏幕上保留多长时间?

Please check the below declared tag in xml. 请在xml中检查以下声明的标记。

<com.google.android.exoplayer2.ui.PlayerView
                android:id="@+id/mPlayerView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                app:controller_layout_id="@layout/exo_playback_control_view"
                app:player_layout_id="@layout/exo_simple_player_view"
                app:repeat_toggle_modes="none"
                app:resize_mode="fixed_height"

                app:show_timeout="5000"

                app:surface_type="texture_view" />

The attribute show_timeout when given in milliseconds as mentioned in above player will make the control disappear after 5 seconds. 如上面播放器中提到的,以毫秒为单位给出的属性show_timeout将使控件在5秒后消失。 Check this . 检查一下

Hope it helps. 希望能帮助到你。 Happy coding! 快乐的编码!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM