bevy / photo-editor-android

Photo Editor SDK contains a lot of features like edit, scale, rotate and draw on images like Instagram stories.
MIT License
548 stars 189 forks source link

Cant use it for video #18

Open anonym2 opened 6 years ago

anonym2 commented 6 years ago

We cant use this on video ?

HemangiVekaria commented 6 years ago

Hello, I am using this library for image and its working fine. But when i am using it for video it does not work.

owahab commented 6 years ago

This SDK is intended for images only. Videos are not supported.

HemangiVekaria commented 6 years ago

thanks @owahab. Now i figure out solution and its work with video. I have xml file like this :


<RelativeLayout android:id="@+id/imgVideoRl" android:layout_width="match_parent" android:layout_height="280dp" android:layout_above="@+id/recyclerFilter" android:layout_below="@id/rlMain" android:layout_marginBottom="20dp" android:layout_marginTop="20dp">

    <ImageView
        android:id="@+id/imgPreview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="centerCrop"
        android:visibility="visible" />

    <com.google.android.exoplayer2.ui.PlayerView
        android:id="@+id/videoMain"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone"
        app:resize_mode="fill" />


i am creating PhotoEditorSDK for image like this and at that time video view's visibility is invisible. photoEditorSDK = new PhotoEditorSDK.PhotoEditorSDKBuilder(MainActivity.this) .parentView(imgVideoRl) .childView(imgPreview).buildPhotoEditorSDK();

now at the time of video before creating PhotoEditorSDK i just set this line imgPreview.setVisibility(View.INVISIBLE); and after that create photoEditorSDK same as image and its works for me...