2011年12月9日金曜日

MediaPlayer API More

I used more MediaPlayer class API.
getDuration(), getVideoHeight(), getVideoWidth(), isLooping(), isPlaying().

While app not play clip, getVideoHeight() = 0 and getVideoWidth() = 0. and isPlaying() is false.
Log.d("player", "duration = " + _mediaplayer.getDuration());
Log.d("player", "getVideoHeight = " + _mediaplayer.getVideoHeight());
Log.d("player", "getVideoWidth = " + _mediaplayer.getVideoWidth());
Log.d("player", "isLooping=" + _mediaplayer.isLooping());
Log.d("player", "isPlaying=" + _mediaplayer.isPlaying());

but.. While app play clip, getVideoHeigth() = 240, getVideoWidth=320, and isPlaying=true.
Log.d("player", "getVideoHeight = " + _mediaplayer.getVideoHeight());
Log.d("player", "getVideoWidth = " + _mediaplayer.getVideoWidth());
Log.d("player", "isPlaying=" + _mediaplayer.isPlaying());
My source code is here.

0 件のコメント:

コメントを投稿