public final class TweetMediaUtils
extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
GIF_TYPE |
static String |
PHOTO_TYPE |
static String |
VIDEO_TYPE |
| Modifier and Type | Method and Description |
|---|---|
static List<MediaEntity> |
getPhotoEntities(Tweet tweet)
This method gets the all the photos from the tweet, which are used to display inline
|
static MediaEntity |
getPhotoEntity(Tweet tweet)
This method gets the last photo entity out of the tweet, this is the photo to display inline
|
static VideoInfo.Variant |
getSupportedVariant(MediaEntity mediaEntity) |
static MediaEntity |
getVideoEntity(Tweet tweet)
This method gets the first video or animated gif entity out of the tweet, this is the video
to display inline
|
static boolean |
hasPhoto(Tweet tweet)
Returns true if there is a media entity with the type of "photo"
|
static boolean |
hasSupportedVideo(Tweet tweet)
Returns true if there is a media entity with the type of "video" or "animated_gif" and
playback is supported.
|
static boolean |
isLooping(MediaEntity mediaEntity) |
static boolean |
showVideoControls(MediaEntity mediaEntity) |
public static final String PHOTO_TYPE
public static final String VIDEO_TYPE
public static final String GIF_TYPE
public static MediaEntity getPhotoEntity(Tweet tweet)
tweet - The Tweetpublic static List<MediaEntity> getPhotoEntities(Tweet tweet)
tweet - The Tweetpublic static boolean hasPhoto(Tweet tweet)
tweet - The Tweet entitiespublic static MediaEntity getVideoEntity(Tweet tweet)
tweet - The Tweetpublic static boolean hasSupportedVideo(Tweet tweet)
tweet - The Tweetpublic static VideoInfo.Variant getSupportedVariant(MediaEntity mediaEntity)
public static boolean isLooping(MediaEntity mediaEntity)
public static boolean showVideoControls(MediaEntity mediaEntity)