how to set background in video view to avoid showing phone screen using videoview.
before playing screen like this link:
before loading screen like this link:
Related
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.
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,
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.
I'm trying to play a video, where the first and last frame of the video match a static background image. However I see a fullscreen black flash just before and after the movie clip.
How can I avoid this fullscreen black flash?
See here on how to avoid the fullscreen black flash:
https://groups.google.com/forum/#!topic/android-developers/ZSe73VtmTE8
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,