Skip to content

mklimek/frame-video-view

Repository files navigation

frame-viedo-view

No more issues with VideoView.
Read more:
"How to avoid flickering and black screen issues when using VideoView?"

How to use it?

Step 1. Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url "https://jitpack.io" }
		}
	}

Step 2. Add the dependency

	dependencies {
	        compile 'com.github.mklimek:frame-video-view:1.2.0'
	}

See example for more details.

How it works?

FrameVideoView solved flickering and black screen issues by showing placeholder in proper time.
If your device is running API level 14 or higher it will use TextureView to increase video playback performance, otherwise VideoView will be used.

Manipulate video playback

Call setFrameVideoViewListener method to get instance of MediaPlayer by call:

frameVideoView.setFrameVideoViewListener(new FrameVideoViewListener() {
            @Override
            public void mediaPlayerPrepared(final MediaPlayer mediaPlayer) {
                MainActivity.this.mediaPlayer = mediaPlayer;
            }
        });

after that you can call pause, resume, looping and other methods available in MediaPlayer.

About

Less issues with VideoView

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages