本文整理汇总了Java中io.vov.vitamio.MediaPlayer.getVideoHeight方法的典型用法代码示例。如果您正苦于以下问题:Java MediaPlayer.getVideoHeight方法的具体用法?Java MediaPlayer.getVideoHeight怎么用?Java MediaPlayer.getVideoHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.vov.vitamio.MediaPlayer
的用法示例。
在下文中一共展示了MediaPlayer.getVideoHeight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onVideoSizeChanged
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
Log.d("onVideoSizeChanged: (%dx%d)", width, height);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
}
}
示例2: onVideoSizeChanged
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
Log.d("onVideoSizeChanged: (%dx%d)", width, height);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
if (mVideoWidth != 0 && mVideoHeight != 0)
setVideoLayout(mVideoLayout, mAspectRatio);
}
示例3: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null)
mMediaController.show();
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null)
mMediaController.show(0);
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例4: onVideoSizeChanged
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
Log.d("onVideoSizeChanged: (%dx%d)", width, height);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
if (mVideoWidth != 0 && mVideoHeight != 0)
setVideoLayout(mVideoLayout, mAspectRatio);
}
示例5: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null)
mMediaController.show();
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null)
mMediaController.show(0);
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例6: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
if (false) {
stopPlayback();
return;
}
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null)
mMediaController.show();
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null)
mMediaController.show(0);
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例7: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null)
mMediaController.show();
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null)
mMediaController.show(0);
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例8: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
if (false) {
stopPlayback();
return;
}
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null)
mMediaController.show();
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null)
mMediaController.show(0);
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例9: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null)
mMediaController.show();
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null)
mMediaController.show(0);
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例10: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
@Override
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
mCurrentState = STATE_PREPARED;
mTargetState = STATE_PLAYING;
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null)
mMediaController.show();
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null)
mMediaController.show(0);
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例11: onVideoSizeChanged
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
Log.d("onVideoSizeChanged: (%dx%d)", width, height);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
scaleVideoSize(width, height);
}
示例12: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
if (false) {
stopPlayback();
return;
}
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例13: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
if (false) {
stopPlayback();
return;
}
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例14: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null)
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0)
seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null)
mMediaController.show();
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null)
mMediaController.show(0);
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}
示例15: onPrepared
import io.vov.vitamio.MediaPlayer; //导入方法依赖的package包/类
public void onPrepared(MediaPlayer mp) {
Log.d("onPrepared");
if (false) {
stopPlayback();
return;
}
mCurrentState = STATE_PREPARED;
// mTargetState = STATE_PLAYING;
// Get the capabilities of the player for this stream
//TODO mCanPause
if (mOnPreparedListener != null) {
mOnPreparedListener.onPrepared(mMediaPlayer);
}
if (mMediaController != null) {
mMediaController.setEnabled(true);
}
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
mVideoAspectRatio = mp.getVideoAspectRatio();
long seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0) {
seekTo(seekToPosition);
}
if (mVideoWidth != 0 && mVideoHeight != 0) {
setVideoLayout(mVideoLayout, mAspectRatio);
if (mSurfaceWidth == mVideoWidth && mSurfaceHeight == mVideoHeight) {
if (mTargetState == STATE_PLAYING) {
start();
if (mMediaController != null) {
mMediaController.show();
}
} else if (!isPlaying() && (seekToPosition != 0 || getCurrentPosition() > 0)) {
if (mMediaController != null) {
mMediaController.show(0);
}
}
}
} else if (mTargetState == STATE_PLAYING) {
start();
}
}