本文整理匯總了Java中android.media.MediaPlayer.OnPreparedListener方法的典型用法代碼示例。如果您正苦於以下問題:Java MediaPlayer.OnPreparedListener方法的具體用法?Java MediaPlayer.OnPreparedListener怎麽用?Java MediaPlayer.OnPreparedListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.media.MediaPlayer
的用法示例。
在下文中一共展示了MediaPlayer.OnPreparedListener方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: prepareAsync
import android.media.MediaPlayer; //導入方法依賴的package包/類
private void prepareAsync(final MediaPlayer.OnPreparedListener onPreparedListener) {
if (mediaPlayer != null && state == PlayerState.NOT_PREPARED
|| state == PlayerState.STOPPED) {
mediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
state = PlayerState.PREPARED;
onPreparedListener.onPrepared(mp);
}
});
mediaPlayer.prepareAsync();
}
}
示例2: setOnPreparedListener
import android.media.MediaPlayer; //導入方法依賴的package包/類
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) {
mOnPreparedListener = l;
if (mVideoView != null) {
mVideoView.setOnPreparedListener(l);
}
}
示例3: setOnPreparedListener
import android.media.MediaPlayer; //導入方法依賴的package包/類
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) {
mOnPreparedListener = l;
}
示例4: setOnPreparedListener
import android.media.MediaPlayer; //導入方法依賴的package包/類
@Override
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l) {
super.setOnPreparedListener(l);
}