<com.hmju.youtubeplayer.YoutubePlayerView
android:id="@+id/youtubeView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<com.hmju.youtubeplayer.YoutubePlayerView
android:id="@+id/youtubeView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:youtubeThumbnailId="@id/imgThumb">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/imgThumb"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop" />
</com.hmju.youtubeplayer.YoutubePlayerView>
<declare-styleable name="YoutubePlayerView">
<attr name="youtubeThumbnailId" format="reference"/> <!-- 썸네일 아이디값 -->
<attr name="youtubeIsAutoPlay" format="boolean"/> <!-- 자동 재생 유무 -->
<attr name="youtubeIsWebControl" format="boolean"/> <!-- 웹뷰에서 제공하는 컨트롤러 의존 유무 -->
<attr name="youtubeIsLogo" format="boolean"/> <!-- 로고 표시 유무 -->
<attr name="youtubeIsLoop" format="boolean"/> <!-- 연속 재생 유무 -->
<attr name="youtubeIsEffect" format="boolean"/> <!-- 동영상 특수효과 유무 -->
<attr name="youtubeIsRelation" format="boolean"/> <!-- 관련 영상 표시 유무 -->
<attr name="youtubeLoadPolicy" format="integer"/> <!-- 1로 설정시 사용자가 자막을 중지하더라도 표시 -->
<attr name="youtubeLangPref" format="string"/> <!-- 자막 표시 언어 코드 -->
<attr name="youtubeIsFullscreen" format="boolean"/> <!-- 전체 화면 표시 유무 -->
<attr name="youtubeIsShare" format="boolean"/> <!-- 공유하기 버튼 유무 -->
<attr name="youtubeSkipThumbNail" format="boolean"/> <!-- 내/외부 썸네일 처리 스킵 유무 -->
</declare-styleable>