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

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

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

Video.getProperties介绍

暂无

代码示例

代码示例来源: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

@Override
  public void onVideo(Video video) {
    String title = video.getName();
    if (!TextUtils.isEmpty(title)) {
      TextView textView = findViewById(R.id.video_title_text);
      textView.setText(title);
    }
    Object descriptionObj = video.getProperties().get(PROPS_LONG_DESCRIPTION);
    if (descriptionObj instanceof String) {
      TextView longDesc = findViewById(R.id.video_description_text);
      longDesc.setText((String) descriptionObj);
    }
    baseVideoView.add(video);
  }
});

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

@Override
  protected void onCreate(Bundle savedInstanceState) {
    // When extending the BrightcovePlayer, we must assign the brightcoveVideoView before
    // entering the superclass. This allows for some stock video player lifecycle
    // management.  Establish the video object and use it's event emitter to get important
    // notifications and to control logging.
    setContentView(R.layout.activity_main);
    brightcoveVideoView = (BrightcoveExoPlayerVideoView) findViewById(R.id.brightcove_video_view);
    super.onCreate(savedInstanceState);

    Video video = Video.createVideo("YOUR_LIVE_HLS_STREAM", DeliveryType.HLS);
    video.getProperties().put(Video.Fields.PUBLISHER_ID, "YOUR_VIDEOCLOUD_PUBLISHER_ID");
    brightcoveVideoView.add(video);
    brightcoveVideoView.start();
  }
}

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

video.getProperties().put(Video.Fields.PUBLISHER_ID, "5420904993001");
brightcoveVideoView.add(video);
brightcoveVideoView.start();

相关文章