Java Code Examples for android.media.MediaPlayer#OnPreparedListener
The following examples show how to use
android.media.MediaPlayer#OnPreparedListener .
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: WXVideoView.java From ucar-weex-core with Apache License 2.0 | 5 votes |
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; if (mVideoView != null) { mVideoView.setOnPreparedListener(l); } }
Example 2
Source File: AndroidMediaPlayerFacadeTest.java From no-player with Apache License 2.0 | 5 votes |
@Test public void givenBoundPreparedListener_andMediaPlayerIsPrepared_whenPrepared_thenForwardsOnPrepared() { facade.prepareVideo(ANY_URI, eitherSurface); ArgumentCaptor<MediaPlayer.OnPreparedListener> argumentCaptor = ArgumentCaptor.forClass(MediaPlayer.OnPreparedListener.class); verify(mediaPlayer).setOnPreparedListener(argumentCaptor.capture()); argumentCaptor.getValue().onPrepared(mediaPlayer); verify(preparedListener).onPrepared(mediaPlayer); }
Example 3
Source File: PlayerControllerTest.java From twitter-kit-android with Apache License 2.0 | 4 votes |
private void verifyOnPreparedListener(MediaPlayer.OnPreparedListener listener) { listener.onPrepared(null); verify(videoProgressView).setVisibility(View.GONE); }
Example 4
Source File: ScalableVideoView.java From Android-ScalableVideoView with Apache License 2.0 | 4 votes |
public void prepare(@Nullable MediaPlayer.OnPreparedListener listener) throws IOException, IllegalStateException { mMediaPlayer.setOnPreparedListener(listener); mMediaPlayer.prepare(); }
Example 5
Source File: ScalableVideoView.java From Android-ScalableVideoView with Apache License 2.0 | 4 votes |
public void prepareAsync(@Nullable MediaPlayer.OnPreparedListener listener) throws IllegalStateException { mMediaPlayer.setOnPreparedListener(listener); mMediaPlayer.prepareAsync(); }
Example 6
Source File: SurfaceVideoView.java From VideoRecord with MIT License | 4 votes |
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; }
Example 7
Source File: VideoView.java From Spectaculum with Apache License 2.0 | 4 votes |
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { this.mOnPreparedListener = l; }
Example 8
Source File: MediaPlayerPreparedListener.java From no-player with Apache License 2.0 | 4 votes |
void add(MediaPlayer.OnPreparedListener listener) { listeners.add(listener); }
Example 9
Source File: MediaPlayerBridge.java From android-chromium with BSD 2-Clause "Simplified" License | 4 votes |
protected void setOnPreparedListener(MediaPlayer.OnPreparedListener listener) { getLocalPlayer().setOnPreparedListener(listener); }
Example 10
Source File: AndroidMediaPlayerFacadeTest.java From no-player with Apache License 2.0 | 4 votes |
private void givenMediaPlayerIsPreparedWith(Either<Surface, SurfaceHolder> eitherSurface) { facade.prepareVideo(ANY_URI, eitherSurface); ArgumentCaptor<MediaPlayer.OnPreparedListener> argumentCaptor = ArgumentCaptor.forClass(MediaPlayer.OnPreparedListener.class); verify(mediaPlayer).setOnPreparedListener(argumentCaptor.capture()); argumentCaptor.getValue().onPrepared(mediaPlayer); }
Example 11
Source File: DSL.java From anvil with MIT License | 4 votes |
public static Void onPrepared(MediaPlayer.OnPreparedListener arg) { return BaseDSL.attr("onPrepared", arg); }
Example 12
Source File: NativeTextureVideoView.java From ExoMedia with Apache License 2.0 | 2 votes |
/** * Register a callback to be invoked when the media file * is loaded and ready to go. * * @param listener The callback that will be run */ public void setOnPreparedListener(@Nullable MediaPlayer.OnPreparedListener listener) { delegate.setOnPreparedListener(listener); }
Example 13
Source File: VideoView.java From twitter-kit-android with Apache License 2.0 | 2 votes |
/** * Register a callback to be invoked when the media file * is loaded and ready to go. * * @param l The callback that will be run */ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; }
Example 14
Source File: UniversalVideoView.java From LLApp with Apache License 2.0 | 2 votes |
/** * Register a callback to be invoked when the media file * is loaded and ready to go. * * @param l The callback that will be run */ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; }
Example 15
Source File: MediaVideoViewOld.java From Slide with GNU General Public License v3.0 | 2 votes |
/** * Register a callback to be invoked when the media file * is loaded and ready to go. * * @param l The callback that will be run */ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; }
Example 16
Source File: TextureVideoView.java From texturevideoview with Apache License 2.0 | 2 votes |
/** * Register a callback to be invoked when the media file * is loaded and ready to go. * * @param l The callback that will be run */ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; }
Example 17
Source File: VideoView.java From Android-VideoView with GNU General Public License v2.0 | 2 votes |
/** * Register a callback to be invoked when the media file is loaded and ready * to go. * * @param l * The callback that will be run */ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; }
Example 18
Source File: VideoView.java From Alite with GNU General Public License v3.0 | 2 votes |
/** * Register a callback to be invoked when the media file * is loaded and ready to go. * * @param l The callback that will be run */ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; }
Example 19
Source File: VideoView.java From imsdk-android with MIT License | 2 votes |
/** * Register a callback to be invoked when the media file * is loaded and ready to go. * * @param l The callback that will be run */ public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) { mOnPreparedListener = l; }
Example 20
Source File: IVideoView.java From jellyfin-androidtv with GNU General Public License v2.0 | votes |
public void setOnPreparedListener(MediaPlayer.OnPreparedListener listener);