Java Code Examples for android.media.MediaPlayer#OnBufferingUpdateListener
The following examples show how to use
android.media.MediaPlayer#OnBufferingUpdateListener .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AndroidMediaPlayerFacadeTest.java From no-player with Apache License 2.0 | 5 votes |
@Test public void givenBoundBufferListener_andMediaPlayerIsPrepared_whenBuffering_thenBufferPercentageIsUpdated() { givenMediaPlayerIsPrepared(); ArgumentCaptor<MediaPlayer.OnBufferingUpdateListener> argumentCaptor = ArgumentCaptor.forClass(MediaPlayer.OnBufferingUpdateListener.class); verify(mediaPlayer).setOnBufferingUpdateListener(argumentCaptor.capture()); argumentCaptor.getValue().onBufferingUpdate(mediaPlayer, TEN_PERCENT); int bufferPercentage = facade.getBufferPercentage(); assertThat(bufferPercentage).isEqualTo(TEN_PERCENT); }
Example 2
Source File: MediaPlayerBridge.java From 365browser with Apache License 2.0 | 4 votes |
protected void setOnBufferingUpdateListener(MediaPlayer.OnBufferingUpdateListener listener) { getLocalPlayer().setOnBufferingUpdateListener(listener); }
Example 3
Source File: MediaPlayerBridge.java From android-chromium with BSD 2-Clause "Simplified" License | 4 votes |
protected void setOnBufferingUpdateListener(MediaPlayer.OnBufferingUpdateListener listener) { getLocalPlayer().setOnBufferingUpdateListener(listener); }
Example 4
Source File: MediaPlayerBridge.java From android-chromium with BSD 2-Clause "Simplified" License | 4 votes |
protected void setOnBufferingUpdateListener(MediaPlayer.OnBufferingUpdateListener listener) { getLocalPlayer().setOnBufferingUpdateListener(listener); }
Example 5
Source File: NativeTextureVideoView.java From ExoMedia with Apache License 2.0 | 2 votes |
/** * Register a callback to be invoked when the status of a network * stream's buffer has changed. * * @param listener the callback that will be run. */ public void setOnBufferingUpdateListener(@Nullable MediaPlayer.OnBufferingUpdateListener listener) { delegate.setOnBufferingUpdateListener(listener); }
Example 6
Source File: NativeSurfaceVideoView.java From ExoMedia with Apache License 2.0 | 2 votes |
/** * Register a callback to be invoked when the status of a network * stream's buffer has changed. * * @param listener the callback that will be run. */ public void setOnBufferingUpdateListener(@Nullable MediaPlayer.OnBufferingUpdateListener listener) { delegate.setOnBufferingUpdateListener(listener); }
Example 7
Source File: NativeVideoDelegate.java From ExoMedia with Apache License 2.0 | 2 votes |
/** * Register a callback to be invoked when the status of a network * stream's buffer has changed. * * @param listener the callback that will be run. */ public void setOnBufferingUpdateListener(@Nullable MediaPlayer.OnBufferingUpdateListener listener) { onBufferingUpdateListener = listener; }