Android play video on surfaceview in recyclerview - android

I'm trying to play video with exoplayer in card with a recyclerview. It works well except that when I scroll back to top direction I only have black elements on my surfaceview.
Any Idea?

Related

android setAlpha of video which playing in SurfaceView

currently I want to make effect like Youtube app on Android.
I want setAlpha of SurfaceView when the video has been minimized and is swiping left/right, just like Youtube App did.
but I found when I setAlpha of the RelativeLayout outside the SurfaceView, the whole Video disappear but the Layout is still visiable!
Also I found a same question
Android VideoView.setAlpha is not working (Xoom with 3.0)
can someone help me please?
thx!

How to create overlay video widget like has YouTube application?

I'm creating application with video widget that has fullscreen feature.
My approach is, that I have got main FrameLayout and when I toggle fullscreen I add black background and VideoView widget into this layout.
The problem with my approach is, that change of View structure where is VideoView stored causes MediaPlayer to restart playback, therefore video gets rebuffered - lag in playing.
Possible solution
Create overlay widget/layer, where is video played and resize this overlay to fullscreen or position it over area where should be video played. If I'm not wrong. This won't cause invalidation of canvas, like it is when is videoview moved in view hierarchy. Therefore video should continue play like in new youtube application (android 4.3).
Unfortunately, I'm not Android master, just beginner with Android and this is my first more complex application. So, I can't implement this on my own and I also want to another overlay where is video controller placed and this overlay shall be placed over videoview overlay.

Android :play video in PopupWindow [duplicate]

My target: I am trying to play a video when tapping on one of the item on the screen while still staying on that screen.
So I resort to PopupWindow but somehow VideoView doesn't show up in the popup.
I can display popup just fine but the VideoView doesn't(in fact, it's not invisible but rather freeze that section of the screen). If you look at the second and third screen, you will see that the invisible area isn't exactly rectangular. That's because I am animating the popupwindow.
I checked the VideoView itself inside another Activity and it plays nicely. I tested this with Nexus One and Galaxy S, both display the same result.
Quick search on StackOverflow shows this question : android video, hear sound but no video
which leads to
Android not playing Video .mp4
and both doesn't work for me.
Also, as you can see on the third screen, the MediaController doesn't exactly attach itself to the video or popupwindow but the Activity instead.
Here's the screens,

i am playing a video using video view , i want to play it providing a skip play option on the screen

The video view is in full screen. I want the display in half of the screen and a skip button at the bottom of the screen which will skip the video.
Just add button and progressbar to the layout you have video view on and add controls for them.

VideoView invisible in Popupwindow?

My target: I am trying to play a video when tapping on one of the item on the screen while still staying on that screen.
So I resort to PopupWindow but somehow VideoView doesn't show up in the popup.
I can display popup just fine but the VideoView doesn't(in fact, it's not invisible but rather freeze that section of the screen). If you look at the second and third screen, you will see that the invisible area isn't exactly rectangular. That's because I am animating the popupwindow.
I checked the VideoView itself inside another Activity and it plays nicely. I tested this with Nexus One and Galaxy S, both display the same result.
Quick search on StackOverflow shows this question : android video, hear sound but no video
which leads to
Android not playing Video .mp4
and both doesn't work for me.
Also, as you can see on the third screen, the MediaController doesn't exactly attach itself to the video or popupwindow but the Activity instead.
Here's the screens,

Categories

Resources