android - 以编程方式将 TextureView 与 ExoPlayer 一起使用?
问题描述
PlayerView
我以编程方式创建一个:
PlayerView playerView = new PlayerView(context);
而不是使用SurfaceView
,我希望它使用TextureView
。在文档中,它说要执行以下操作:
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/player_view"
app:surface_type="texture_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
但是,就像我说的那样,我正在以编程方式创建它,那么如何设置它以TextureView
在我的情况下使用呢?
解决方案
推荐阅读
- bootstrap-5 - 引导程序 5 中的可搜索选择
- next.js - 组件定义缺少显示名称eslintreact/display-name
- selenium - 使用 Selenium C# DevTools 如何使用 c# 捕获 f12 选项(网络)
- excel - 在 Excel 中计算电力塔的困难
- entity-framework - 在 Razor 页面中添加脚手架项目时出错
- django - 如何在序列化程序中获取所有字段名称
- unity3d - Unity3D - 将第三人称视角限制为仅查看 FPS 视图可以看到的内容
- javascript - 如何在 js discord bot 开发中使用 cookie
- c++ - C++静态对象不保存数组属性值
- pandas - 为什么带有 adlfs 的 dask read_csv() 会遇到内存问题?