本文整理了Java中com.brightcove.player.model.Video.getDuration()
方法的一些代码示例,展示了Video.getDuration()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Video.getDuration()
方法的具体详情如下:
包路径:com.brightcove.player.model.Video
类名称:Video
方法名:getDuration
暂无
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onDateSelected(@NonNull Date expiryDate) {
long playDuration = video.getDuration();
if (playDuration == 0) {
playDuration = DEFAULT_RENTAL_PLAY_DURATION;
}
catalog.requestRentalLicense(video, expiryDate, playDuration, licenseEventListener);
}
})
代码示例来源: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
int duration = video.getDuration();
if (duration > 0) {
holder.videoDurationText.setText(millisecondsToString(duration));
内容来源于网络,如有侵权,请联系作者删除!