com.devlin_n.yinyangplayer.player.YinYangPlayer.setVideoController()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(78)

本文整理了Java中com.devlin_n.yinyangplayer.player.YinYangPlayer.setVideoController()方法的一些代码示例,展示了YinYangPlayer.setVideoController()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YinYangPlayer.setVideoController()方法的具体详情如下:
包路径:com.devlin_n.yinyangplayer.player.YinYangPlayer
类名称:YinYangPlayer
方法名:setVideoController

YinYangPlayer.setVideoController介绍

[英]设置控制器
[中]设置控制器

代码示例

代码示例来源:origin: yuger/TVLive

/**
 * 播放下一条视频
 */
private void playNext() {
  VideoModel videoModel = mVideoModels.get(mCurrentVideoPosition);
  if (videoModel != null) {
    mCurrentUrl = videoModel.url;
    mCurrentTitle = videoModel.title;
    mCurrentPosition = 0;
    setVideoController(videoModel.controller);
  }
}

代码示例来源:origin: yuger/TVLive

@Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_tv);
    yinYangPlayer = (YinYangPlayer) findViewById(R.id.player);

    String url = getIntent().getStringExtra("url");
    String name = getIntent().getStringExtra("name");

    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
      actionBar.setTitle(name);
      actionBar.setDisplayHomeAsUpEnabled(true);
    }
    StandardVideoController controller = new StandardVideoController(this);
    controller.setLive(true);
    Glide.with(this).load("http://7xqblc.com1.z0.glb.clouddn.com/tvlive.jpg").asBitmap()
        .animate(R.anim.anim_alpha_in).placeholder(android.R.color.black).into(controller.getThumb());
    yinYangPlayer.autoRotate()
//                .useAndroidMediaPlayer()
        .setUrl(url)
        .setVideoController(controller);
  }

代码示例来源:origin: yuger/TVLive

private void startPlay() {
  if (isCache) videoView.enableCache();
  videoView.skipPositionWhenPlay(url, position).setVideoController(new FloatController(getApplicationContext())).start();
  wm.addView(floatView, wmParams);
}

相关文章