本文整理了Java中com.brightcove.player.model.Video.getName()
方法的一些代码示例,展示了Video.getName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Video.getName()
方法的具体详情如下:
包路径:com.brightcove.player.model.Video
类名称:Video
方法名:getName
暂无
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onError(String error) {
String message = showToast(
"Cannot find '%s' video: %s", video.getName(), error);
Log.e(TAG, message);
}
}
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onDownloadDeleted(@NonNull final Video video) {
//No need to update UI here because it will be handled by the deleteVideo method.
String message = showToast(
"Offline copy of '%s' video removed", video.getName());
Log.i(TAG, message);
onDownloadRemoved(video);
}
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onDownloadCanceled(@NonNull final Video video) {
//No need to update UI here because it will be handled by the deleteVideo method.
String message = showToast(
"Cancelled download of '%s' video removed", video.getName());
Log.i(TAG, message);
onDownloadRemoved(video);
}
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onDownloadCompleted(@NonNull final Video video, @NonNull final DownloadStatus status) {
videoListAdapter.notifyVideoChanged(video, status);
String message = showToast(
"Successfully saved '%s' video", video.getName());
Log.i(TAG, message);
}
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onDownloadRequested(@NonNull final Video video) {
Log.i(TAG, String.format(
"Starting to process '%s' video download request", video.getName()));
videoListAdapter.notifyVideoChanged(video);
}
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onDownloadStarted(@NonNull Video video, long estimatedSize, @NonNull Map<String, Serializable> mediaProperties) {
videoListAdapter.notifyVideoChanged(video);
String message = showToast(
"Started to download '%s' video. Estimated = %s, width = %s, height = %s, mimeType = %s",
video.getName(),
Formatter.formatFileSize(MainActivity.this, estimatedSize),
mediaProperties.get(Event.RENDITION_WIDTH),
mediaProperties.get(Event.RENDITION_HEIGHT),
mediaProperties.get(Event.RENDITION_MIME_TYPE)
);
Log.i(TAG, message);
}
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onDownloadPaused(@NonNull final Video video, @NonNull final DownloadStatus status) {
Log.i(TAG, String.format(
"Paused download of '%s' video: Reason #%d", video.getName(), status.getReason()));
videoListAdapter.notifyVideoChanged(video, status);
}
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void onDownloadFailed(@NonNull final Video video, @NonNull final DownloadStatus status) {
videoListAdapter.notifyVideoChanged(video, status);
String message = showToast(
"Failed to download '%s' video: Error #%d", video.getName(), status.getReason());
Log.e(TAG, message);
}
};
代码示例来源:origin: BrightcoveOS/android-player-samples
@Override
public void processEvent(Event event) {
final String type = event.getType();
final Video video = (Video) event.properties.get(Event.VIDEO);
switch (type) {
case EventType.ODRM_LICENSE_ACQUIRED: {
videoListAdapter.notifyVideoChanged(video);
String message = showToast(
"Successfully downloaded license for '%s' video", video.getName());
Log.i(TAG, message);
break;
}
case EventType.ODRM_PLAYBACK_NOT_ALLOWED:
case EventType.ODRM_SOURCE_NOT_FOUND: {
String message = showToast(
"Failed to downloaded license for '%s' video: %s", video.getName(), type);
Log.w(TAG, message);
break;
}
case EventType.ODRM_LICENSE_ERROR: {
String message = showToast(
"Error encountered while downloading license for '%s' video", video.getName());
Log.e(TAG, message, (Throwable) event.properties.get(Event.ERROR));
break;
}
}
}
};
代码示例来源: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
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 onDownloadProgress(@NonNull final Video video, @NonNull final DownloadStatus status) {
Log.i(TAG, String.format(
"Downloaded %s out of %s of '%s' video. Progress %3.2f",
Formatter.formatFileSize(MainActivity.this, status.getBytesDownloaded()),
Formatter.formatFileSize(MainActivity.this, status.getMaxSize()),
video.getName(), status.getProgress()));
videoListAdapter.notifyVideoChanged(video, status);
}
代码示例来源:origin: BrightcoveOS/android-player-samples
holder.videoTitleText.setText(video.getName());
内容来源于网络,如有侵权,请联系作者删除!