VideoView:Avoiding fullscreen black flash - android

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

Related

How to disable options button functionality when video playing in bright script

I am working on roku using Scene Graph. I want disable options(asterisk) button functionality when video playing.
Thank you.
According to the documentations the video player will ALWAYS have the options button functionality when in full screen,
"The one exception is the closed-caption dialog, which always appears when the video is playing fullscreen."
from: https://sdkdocs.roku.com/display/sdkdoc/Video
What I did is actually set the video to be 1px less than full screen (e,g 1280 x 719), and then I was able to capture and override the options key functionality. It might be possible to add a 1px transparent rectangle on the video instead.

Android: How to extend video to full screen?

I got a videoView, that plays in landscape. When rotating the device I want to switch to full screen. Just like youtube does.
In my solution when going to landscape I start new activity in full screen mode and trying to continue playing from where I stopped.
The problem is that it takes to long and there is a black screen for a moment. Do you have any suggestion how to improve this?

Video view to set background

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:

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,

Hide video but have it continue to play

I have an image and a video player. In portrait, it shows both. Doing landscape left, just the video shows. Doing landscape right just the image shows.
I am using the setVisibility() method right now to achieve that. The problem with doing:
myVideoView.setVisibility(View.INVISIBLE);
causes the video to stop playing. Is there a way to keep it playing but also not visible to the user? Maybe like set the opacity of the VideoView to 0?
I think I found a solution here. In order to make videoview invisible and keep it playing sound you simply hide it by setting alpha value.
mVideoView.setAlpha(0f);
Hope it works for you!
You could try changing the z-order of the views with the bringToFront() method.
If you want the video to show then call mVideoView.bringToFront() and when you want the image to show you could use mImageView.bringToFront() this should work as long as the video and the image both occupy the same space on the screen.
Good luck

Categories

Resources