com.brightcove.player.model.Video.getStillImageUri()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(125)

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

Video.getStillImageUri介绍

暂无

代码示例

代码示例来源:origin: BrightcoveOS/android-player-samples

@Override
public void onBindViewHolder(ViewHolder holder, @SuppressLint("RecyclerView") final int position) {
  final Video video = videoList.get(position);
  holder.videoTitleText.setText(video.getName());
  Object descriptionObj = video.getProperties().get(PROPS_SHORT_DESCRIPTION);
  if (descriptionObj instanceof String) {
    holder.videoDescriptionText.setText((String) descriptionObj);
  }
  int duration = video.getDuration();
  if (duration > 0) {
    holder.videoDurationText.setText(millisecondsToString(duration));
    holder.videoDurationText.setVisibility(View.VISIBLE);
  } else {
    holder.videoDurationText.setText(null);
    holder.videoDurationText.setVisibility(View.GONE);
  }
  URI imageUri = video.getStillImageUri();
  if (imageUri == null) {
    holder.videoThumbnailImage.setImageResource(R.drawable.movie);
  } else {
    Picasso.with(holder.itemView.getContext()).load(imageUri.toASCIIString()).into(holder.videoThumbnailImage);
  }
  holder.videoThumbnailImage.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
      clickListener.itemClicked(view, video, position);
    }
  });
}

代码示例来源:origin: BrightcoveOS/android-player-samples

URI imageUri = video.getStillImageUri();
if (imageUri == null) {
  holder.videoThumbnailImage.setImageResource(R.drawable.movie);

相关文章