当前位置: 首页>>代码示例>>Java>>正文


Java MediaPlayer.getVideoHeight方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:10,代码来源:VideoView.java

示例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);
}
 
开发者ID:Leavessilent,项目名称:QuanMinTV,代码行数:9,代码来源:VideoView.java

示例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();
   }
 }
 
开发者ID:Leavessilent,项目名称:QuanMinTV,代码行数:37,代码来源:VideoView.java

示例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);
}
 
开发者ID:WangZhiYao,项目名称:VideoDemo,代码行数:9,代码来源:VideoView.java

示例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();
    }
}
 
开发者ID:WangZhiYao,项目名称:VideoDemo,代码行数:37,代码来源:VideoView.java

示例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();
   }
 }
 
开发者ID:wy353208214,项目名称:ListVideoViewBaseOnVitamio,代码行数:41,代码来源:VideoView.java

示例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();
  }
}
 
开发者ID:shegang,项目名称:meishiDemo,代码行数:37,代码来源:VideoView.java

示例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();
   }
 }
 
开发者ID:yuqirong,项目名称:RxNews,代码行数:41,代码来源:VideoView.java

示例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();
   }
 }
 
开发者ID:wuyinlei,项目名称:MyHearts,代码行数:38,代码来源:VideoView.java

示例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();
	}
}
 
开发者ID:hubcarl,项目名称:mobile-manager-tool,代码行数:35,代码来源:VideoView.java

示例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);
}
 
开发者ID:remobile,项目名称:react-native-video,代码行数:8,代码来源:ScalableVideoView.java

示例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();
    }
}
 
开发者ID:remobile,项目名称:react-native-video,代码行数:33,代码来源:ScalableVideoView.java

示例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();
   }
 }
 
开发者ID:remobile,项目名称:react-native-video,代码行数:34,代码来源:VideoView.java

示例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();
  }
}
 
开发者ID:yashketkar,项目名称:tv,代码行数:37,代码来源:VideoView.java

示例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();
   }
 }
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:46,代码来源:VideoView.java


注:本文中的io.vov.vitamio.MediaPlayer.getVideoHeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。