當前位置: 首頁>>代碼示例>>Java>>正文


Java MediaPlayerControl類代碼示例

本文整理匯總了Java中android.widget.MediaController.MediaPlayerControl的典型用法代碼示例。如果您正苦於以下問題:Java MediaPlayerControl類的具體用法?Java MediaPlayerControl怎麽用?Java MediaPlayerControl使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MediaPlayerControl類屬於android.widget.MediaController包,在下文中一共展示了MediaPlayerControl類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onReceive

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
@Override
public void onReceive(Context context, Intent intent) {
    MediaPlayerControl mediaPlayerControl = Player.getMediaPlayerControl();
    if (mediaPlayerControl == null) {
        return;
    }
    TelephonyManager tm = (TelephonyManager) context
            .getSystemService(Service.TELEPHONY_SERVICE);
    switch (tm.getCallState()) {
        case TelephonyManager.CALL_STATE_RINGING:
            mediaPlayerControl.pause();
            break;
        case TelephonyManager.CALL_STATE_IDLE:
            if (!mediaPlayerControl.isPlaying()) {
                mediaPlayerControl.start();
            }
            break;
    }
}
 
開發者ID:xuender,項目名稱:audiobooks,代碼行數:20,代碼來源:CallReceiver.java

示例2: setMediaPlayer

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
public void setMediaPlayer(MediaPlayerControl player) {
    this.mPlayer = player;
    updatePausePlay();
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:5,代碼來源:MediaControllerView.java

示例3: setMediaPlayer

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
public void setMediaPlayer(MediaPlayerControl player) {
	mPlayer = player;
	updatePausePlay();
}
 
開發者ID:vuthanhict,項目名稱:ExoPlayerController,代碼行數:5,代碼來源:GoatMediaController.java

示例4: setMediaPlayer

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
public void setMediaPlayer(MediaPlayerControl player) {
    mPlayer = player;
    mHandler.sendEmptyMessage(SHOW_PROGRESS);
    updatePausePlay();
}
 
開發者ID:skymania,項目名稱:Cirrus,代碼行數:6,代碼來源:MediaControlView.java

示例5: setMediaPlayer

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
public void setMediaPlayer(MediaPlayerControl player) {
    mPlayer = player;
    updatePausePlay();
}
 
開發者ID:PJakcson,項目名稱:Mediathek,代碼行數:5,代碼來源:VideoControllerView.java

示例6: getMediaPlayerControl

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
@Override
public MediaPlayerControl getMediaPlayerControl()
{
    return this;
}
 
開發者ID:awood82,項目名稱:RoviRunner,代碼行數:6,代碼來源:MediaPlayerPresenter.java

示例7: getMediaPlayerControl

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
static MediaPlayerControl getMediaPlayerControl() {
    return mediaPlayerControl;
}
 
開發者ID:xuender,項目名稱:audiobooks,代碼行數:4,代碼來源:Player.java

示例8: setMediaPlayer

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
void setMediaPlayer(MediaPlayerControl mediaPlayerControl); 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:2,代碼來源:IMediaController.java

示例9: getMediaPlayerControl

import android.widget.MediaController.MediaPlayerControl; //導入依賴的package包/類
MediaPlayerControl getMediaPlayerControl(); 
開發者ID:awood82,項目名稱:RoviRunner,代碼行數:2,代碼來源:IMediaPlayerPresenter.java


注:本文中的android.widget.MediaController.MediaPlayerControl類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。