use of com.connectsdk.core.ImageInfo in project butter-android by butterproject.
the class FireTVService method setMediaSourceFromMediaInfo.
private void setMediaSourceFromMediaInfo(MediaInfo mediaInfo, LaunchListener listener) {
String iconSrc = "";
if (mediaInfo.getImages() != null && !mediaInfo.getImages().isEmpty()) {
ImageInfo imageInfo = mediaInfo.getImages().get(0);
if (imageInfo != null) {
iconSrc = imageInfo.getUrl();
}
}
setMediaSource(mediaInfo.getUrl(), mediaInfo.getSubsUrl(), mediaInfo.getMimeType(), mediaInfo.getTitle(), mediaInfo.getDescription(), iconSrc, listener);
}
use of com.connectsdk.core.ImageInfo in project butter-android by butterproject.
the class RokuService method displayImage.
@Override
public void displayImage(MediaInfo mediaInfo, MediaPlayer.LaunchListener listener) {
String mediaUrl = null;
String mimeType = null;
String title = null;
String desc = null;
String iconSrc = null;
if (mediaInfo != null) {
mediaUrl = mediaInfo.getUrl();
mimeType = mediaInfo.getMimeType();
title = mediaInfo.getTitle();
desc = mediaInfo.getDescription();
if (mediaInfo.getImages() != null && mediaInfo.getImages().size() > 0) {
ImageInfo imageInfo = mediaInfo.getImages().get(0);
iconSrc = imageInfo.getUrl();
}
}
displayImage(mediaUrl, mimeType, title, desc, iconSrc, listener);
}
use of com.connectsdk.core.ImageInfo in project butter-android by butterproject.
the class RokuService method playMedia.
@Override
public void playMedia(MediaInfo mediaInfo, boolean shouldLoop, MediaPlayer.LaunchListener listener) {
String mediaUrl = null;
String mimeType = null;
String title = null;
String desc = null;
String iconSrc = null;
if (mediaInfo != null) {
mediaUrl = mediaInfo.getUrl();
mimeType = mediaInfo.getMimeType();
title = mediaInfo.getTitle();
desc = mediaInfo.getDescription();
if (mediaInfo.getImages() != null && mediaInfo.getImages().size() > 0) {
ImageInfo imageInfo = mediaInfo.getImages().get(0);
iconSrc = imageInfo.getUrl();
}
}
playMedia(mediaUrl, mimeType, title, desc, iconSrc, shouldLoop, listener);
}
Aggregations