Memory

[ANDROID] ExoPlayer 영상 꽉차게 표시하기 본문

IT/ANDROID

[ANDROID] ExoPlayer 영상 꽉차게 표시하기

_JinHa_ 2021. 1. 19. 22:20
반응형

<이전 글>

2021/01/12 - [IT/ANDROID] - [ANDROID/KOTLIN] ExoPlayer로 동영상 실행하기 (r2.12.2)

 

[ANDROID/KOTLIN] ExoPlayer로 동영상 실행하기 (r2.12.2)

ExoPlayer 공식 홈페이지 exoplayer.dev/hello-world.html Hello world! - ExoPlayer exoplayer.dev XML ... CODE ( ViewBinding 사용중 ) class VideoDetailActivity : A..

jinha3211.tistory.com

 

<com.google.android.exoplayer2.ui.PlayerView
            android:id="@+id/exoPlayerV_video_detail"
            android:layout_width="match_parent"
            android:layout_height="210dp"
            app:controller_layout_id="@layout/exo_playback_control_view"
            app:fastforward_increment="10000"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:rewind_increment="10000"
            app:show_timeout="10000" />

// 영상 높이 설정

app:resize_mode="zoom"

<com.google.android.exoplayer2.ui.PlayerView
            android:id="@+id/exoPlayerV_video_detail"
            android:layout_width="match_parent"
            android:layout_height="210dp"
            app:resize_mode="zoom"
            app:controller_layout_id="@layout/exo_playback_control_view"
            app:fastforward_increment="10000"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:rewind_increment="10000"
            app:show_timeout="10000" />

 

 

※ resize_mode 종류

app:resize_mode="fixed_width"
app:resize_mode="fixed_height"
app:resize_mode="fill"
app:resize_mode="fit"
app:resize_mode="zoom"
반응형