use of com.connectsdk.core.ImageInfo in project butter-android by butterproject.
the class NetcastTVService method displayImage.
@Override
public void displayImage(MediaInfo mediaInfo, 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 WebOSTVService 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 WebOSWebAppSession 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 WebOSWebAppSession method playMedia.
@Override
public void playMedia(final MediaInfo mediaInfo, final boolean shouldLoop, final 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);
}
use of com.connectsdk.core.ImageInfo in project butter-android by butterproject.
the class CastService method getMediaInfo.
@Override
public void getMediaInfo(MediaInfoListener listener) {
if (mMediaPlayer == null)
return;
if (mMediaPlayer.getMediaInfo() != null) {
String url = mMediaPlayer.getMediaInfo().getContentId();
String mimeType = mMediaPlayer.getMediaInfo().getContentType();
MediaMetadata metadata = mMediaPlayer.getMediaInfo().getMetadata();
String title = null;
String description = null;
ArrayList<ImageInfo> list = null;
if (metadata != null) {
title = metadata.getString(MediaMetadata.KEY_TITLE);
description = metadata.getString(MediaMetadata.KEY_SUBTITLE);
if (metadata.getImages() != null && metadata.getImages().size() > 0) {
String iconUrl = metadata.getImages().get(0).getUrl().toString();
list = new ArrayList<ImageInfo>();
list.add(new ImageInfo(iconUrl));
}
}
MediaInfo info = new MediaInfo(url, mimeType, title, description, list);
Util.postSuccess(listener, info);
} else {
Util.postError(listener, new ServiceCommandError(0, "Media Info is null", null));
}
}
Aggregations