tcking / GiraffePlayer

android video player base on ijkplayer
Apache License 2.0
681 stars 199 forks source link

Image thumbnail in Player #55

Open TuxRneR opened 7 years ago

TuxRneR commented 7 years ago

How I put a image in to player?

tcking commented 7 years ago

u can put a ImageView at the top of player,like that:

<FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <include
            layout="@layout/giraffe_player"
            android:layout_width="match_parent"
            android:layout_height="210dp"/>
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="210dp"/>

    </FrameLayout>
TuxRneR commented 7 years ago

Hello, thanks and the code. In wath line I define the url of image?

tcking commented 7 years ago

if u want to using a image from network ,try fresco instead of ImageView

TuxRneR commented 7 years ago

Thanks, and. I need replace this code of my activity_main.xml layout? <include layout="@layout/giraffe_player" android:layout_width="match_parent" android:layout_height="210dp"/>

For ur code?

<FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content">

    <include
        layout="@layout/giraffe_player"
        android:layout_width="match_parent"
        android:layout_height="210dp"/>
    <ImageView
        android:layout_width="match_parent"
        android:layout_height="210dp"/

</FrameLayout>

And implement the fresco library dependence?, this it's all right, but the image appear in front of the player and I can play the video with the play button inside of player. How i put the image inside the giraffe player, not in front

tcking commented 7 years ago

player can't display a image yet,however u can put a image on front and set onClickListner to interrupt event

TuxRneR commented 7 years ago

Yeah! That's cool :3 Any way to now put "srt" captions in videos?

tcking commented 7 years ago

not support 😢