Show a preview image before autoplaying video is loaded.

This commit is contained in:
Alex Ning
2020-07-06 22:14:58 +08:00
parent 3ef4b90a63
commit ba2a219168
3 changed files with 28 additions and 2 deletions

View File

@@ -202,6 +202,13 @@
android:background="#000000"
app:resize_mode="fixed_width">
<ImageView
android:id="@+id/preview_image_view_item_post_detail_video_autoplay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitStart"
android:visibility="gone" />
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/player_view_item_post_detail_video_autoplay"
android:layout_width="match_parent"

View File

@@ -206,7 +206,14 @@
android:id="@+id/player_view_item_post_video_type_autoplay"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:controller_layout_id="@layout/exo_autoplay_playback_control_view"/>
app:controller_layout_id="@layout/exo_autoplay_playback_control_view" />
<ImageView
android:id="@+id/preview_image_view_item_post_video_type_autoplay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitStart"
android:visibility="gone" />
</com.google.android.exoplayer2.ui.AspectRatioFrameLayout>