本文整理了Java中android.widget.MediaController.setEnabled()
方法的一些代码示例,展示了MediaController.setEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MediaController.setEnabled()
方法的具体详情如下:
包路径:android.widget.MediaController
类名称:MediaController
方法名:setEnabled
暂无
代码示例来源:origin: stackoverflow.com
mcontroller.setEnabled(true);
mcontroller.show();
代码示例来源:origin: stackoverflow.com
mediaController.setEnabled(true);
mediaController.show();
代码示例来源:origin: konradrenner/kolabnotes-android
public void run() {
mediaController.setEnabled(true);
mediaController.show();
}
});
代码示例来源:origin: stackoverflow.com
MediaController videoController = new MediaController(getActivity());
videoController.setMediaPlayer(this);//your activity which implemented MediaPlayerControl
videoController.setAnchorView(mTextureView);
videoController.setEnabled(true);
videoController.show();
代码示例来源:origin: ExcaliburZ/ImitateBilibili
private void attachMediaController() {
if (mMediaPlayer != null && mMediaController != null) {
mMediaController.setMediaPlayer(this);
View anchorView = this.getParent() instanceof View ? (View) this
.getParent() : this;
mMediaController.setAnchorView(anchorView);
mMediaController.setEnabled(isInPlaybackState());
if (mUri != null) {
List<String> paths = mUri.getPathSegments();
String name = paths == null || paths.isEmpty() ? "null" : paths
.get(paths.size() - 1);
}
}
}
代码示例来源:origin: stackoverflow.com
final VideoView vv = (VideoView) findViewById(R.id.VideoView);
MediaController mc = new MediaController(this);
mc.setEnabled(true);
mc.show(0);
vv.setMediaController(mc);
代码示例来源:origin: mrgames13/SplashScreen
private void attachMediaController() {
if (mMediaPlayer != null && mMediaController != null) {
mMediaController.setMediaPlayer(this);
View anchorView = this.getParent() instanceof View ? (View)this.getParent() : this;
mMediaController.setAnchorView(anchorView);
mMediaController.setEnabled(isInPlaybackState());
}
}
代码示例来源:origin: sprylab/texturevideoview
private void attachMediaController() {
if (mMediaPlayer != null && mMediaController != null) {
mMediaController.setMediaPlayer(this);
View anchorView = this.getParent() instanceof View ?
(View)this.getParent() : this;
mMediaController.setAnchorView(anchorView);
mMediaController.setEnabled(isInPlaybackState());
}
}
代码示例来源:origin: upyun/android-player-sdk
private void attachMediaController() {
if (mMediaPlayer != null && mMediaController != null) {
mMediaController.setMediaPlayer(this);
View anchorView = this.getParent() instanceof View ?
(View) this.getParent() : this;
mMediaController.setAnchorView(anchorView);
mMediaController.setEnabled(isInPlaybackState());
}
}
代码示例来源:origin: upyun/android-player-sdk
private void attachMediaController() {
if (mMediaPlayer != null && mMediaController != null) {
mMediaController.setMediaPlayer(this);
View anchorView = this.getParent() instanceof View ?
(View) this.getParent() : this;
mMediaController.setAnchorView(anchorView);
mMediaController.setEnabled(isInPlaybackState());
}
}
代码示例来源:origin: stackoverflow.com
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoView vv = (VideoView) findViewById(R.id.VideoView);
MediaController mc=new MediaController(this);
mc.setEnabled(true);
vv.setVideoURI(Uri.parse("http://www.youtube.com/v/Iq81rUGQofk"));
vv.setMediaController(mc);
vv.requestFocus();
vv.showContextMenu();
vv.start();
}
代码示例来源:origin: stackoverflow.com
VideoView vv = (VideoView) findViewById(R.id.MainVideo);
MediaController mc=new MediaController(this);
mc.setEnabled(true);
mc.show(0);
vv.setMediaController(mc);
vv.setVideoURI(Uri.parse(URLMedia));
vv.requestFocus();
vv.showContextMenu();
vv.start();
代码示例来源:origin: stackoverflow.com
mcontroller.setEnabled(true);
mcontroller.show();
代码示例来源:origin: stackoverflow.com
mediaController.setEnabled(true);
mediaController.show();
代码示例来源:origin: fire3/sailorcast
private void preparePlayer(boolean playWhenReady) {
if (player == null) {
player = new DemoPlayer(getRendererBuilder());
player.addListener(this);
player.setCaptionListener(this);
player.setMetadataListener(this);
player.seekTo(playerPosition);
playerNeedsPrepare = true;
mediaController.setMediaPlayer(player.getPlayerControl());
mediaController.setEnabled(true);
eventLogger = new EventLogger();
eventLogger.startSession();
player.addListener(eventLogger);
player.setInfoListener(eventLogger);
player.setInternalErrorListener(eventLogger);
debugViewHelper = new DebugTextViewHelper(player, debugTextView);
debugViewHelper.start();
}
if (playerNeedsPrepare) {
player.prepare();
playerNeedsPrepare = false;
updateButtonVisibilities();
}
player.setSurface(surfaceView.getHolder().getSurface());
player.setPlayWhenReady(playWhenReady);
}
代码示例来源:origin: mrgames13/SplashScreen
public void onPrepared(MediaPlayer mp) {
mCurrentState = STATE_PREPARED;
mCanPause = mCanSeekBack = mCanSeekForward = true;
if (mOnPreparedListener != null) mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null) mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
int seekToPosition = mSeekWhenPrepared;
if (seekToPosition != 0) seekTo(seekToPosition);
if (mVideoWidth != 0 && mVideoHeight != 0) {
getHolder().setFixedSize(mVideoWidth, mVideoHeight);
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();
}
}
};
代码示例来源:origin: ExcaliburZ/ImitateBilibili
mOnPreparedListener.onPrepared(mMediaPlayer);
if (mMediaController != null)
mMediaController.setEnabled(true);
mVideoWidth = mp.getVideoWidth();
mVideoHeight = mp.getVideoHeight();
代码示例来源:origin: sprylab/texturevideoview
mMediaController.setEnabled(true);
代码示例来源:origin: upyun/android-player-sdk
mMediaController.setEnabled(true);
代码示例来源:origin: upyun/android-player-sdk
mMediaController.setEnabled(true);
内容来源于网络,如有侵权,请联系作者删除!