user2966445
user2966445

Reputation: 1344

Android VideoView - Possible to Colorize/Add Tint to MP4 while video is playing?

I'm trying to colorize/add tint to a VideoView while an MP4 is playing. For example, a blue tint should be added and the video will remain visible while playing. Is this possible?

<VideoView
    android:id="@+id/myVideo"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:visibility="visible"
    android:layout_centerInParent="true" />

Upvotes: 0

Views: 439

Answers (1)

John Gallagher
John Gallagher

Reputation: 535

I believe you could overlay a view with a drawable on to the video using a framelayout. You could set the background of the view on top of the video to something with an alpha channel from there. Something like:

<FrameLayout 
    android:layout_height="wrap_content"
    android:layout_width="wrap_content">
    <VideoView
         android:id="@+id/myVideo"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:visibility="visible"
         android:layout_centerInParent="true"/>
    <View 
         android:layout_height="match_parent"
         android:layout_width="match_parent"
         android:background="@color/semi_transparent_blue"/>
<FrameLayout/>

Upvotes: 1

Related Questions