Java Code Examples for android.media.MediaPlayer#OnVideoSizeChangedListener
The following examples show how to use
android.media.MediaPlayer#OnVideoSizeChangedListener .
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: AndroidMediaPlayerFacade.java From no-player with Apache License 2.0 | 5 votes |
@Override public void onVideoSizeChanged(MediaPlayer mp, int width, int height) { MediaPlayer.OnVideoSizeChangedListener onVideoSizeChangedForwarder = forwarder.onSizeChangedListener(); if (onVideoSizeChangedForwarder == null) { throw new IllegalStateException("Should bind a OnVideoSizeChangedListener. Cannot forward events."); } onVideoSizeChangedForwarder.onVideoSizeChanged(mp, width, height); }
Example 2
Source File: VideoSizeChangedListener.java From no-player with Apache License 2.0 | 4 votes |
public void add(MediaPlayer.OnVideoSizeChangedListener listener) { listeners.add(listener); }
Example 3
Source File: VideoSizeChangedListener.java From no-player with Apache License 2.0 | 4 votes |
@Override public void onVideoSizeChanged(MediaPlayer mp, int width, int height) { for (MediaPlayer.OnVideoSizeChangedListener listener : listeners) { listener.onVideoSizeChanged(mp, width, height); } }
Example 4
Source File: MediaPlayerForwarder.java From no-player with Apache License 2.0 | 4 votes |
public MediaPlayer.OnVideoSizeChangedListener onSizeChangedListener() { return videoSizeChangedListener; }
Example 5
Source File: AndroidMediaPlayerFacadeTest.java From no-player with Apache License 2.0 | 4 votes |
private void whenVideoSizeChanges() { ArgumentCaptor<MediaPlayer.OnVideoSizeChangedListener> argumentCaptor = ArgumentCaptor.forClass(MediaPlayer.OnVideoSizeChangedListener.class); verify(mediaPlayer).setOnVideoSizeChangedListener(argumentCaptor.capture()); argumentCaptor.getValue().onVideoSizeChanged(mediaPlayer, ANY_WIDTH, ANY_HEIGHT); }
Example 6
Source File: MediaPlayerBridge.java From 365browser with Apache License 2.0 | 4 votes |
protected void setOnVideoSizeChangedListener(MediaPlayer.OnVideoSizeChangedListener listener) { getLocalPlayer().setOnVideoSizeChangedListener(listener); }
Example 7
Source File: MediaPlayerBridge.java From android-chromium with BSD 2-Clause "Simplified" License | 4 votes |
protected void setOnVideoSizeChangedListener(MediaPlayer.OnVideoSizeChangedListener listener) { getLocalPlayer().setOnVideoSizeChangedListener(listener); }
Example 8
Source File: MediaPlayerBridge.java From android-chromium with BSD 2-Clause "Simplified" License | 4 votes |
protected void setOnVideoSizeChangedListener(MediaPlayer.OnVideoSizeChangedListener listener) { getLocalPlayer().setOnVideoSizeChangedListener(listener); }