java.lang.Object
it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage<VideoOrGifMessage>
it.auties.whatsapp.model.message.standard.VideoOrGifMessage
- All Implemented Interfaces:
it.auties.protobuf.model.ProtobufMessage,it.auties.protobuf.model.ProtobufObject,InteractiveHeaderAttachment,HighlyStructuredFourRowTemplateTitle,HydratedFourRowTemplateTitle,MutableAttachmentProvider<VideoOrGifMessage>,ButtonsMessageHeader,ContextualMessage,MediaMessage<VideoOrGifMessage>,Message
public final class VideoOrGifMessage
extends it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage<VideoOrGifMessage>
implements MediaMessage<VideoOrGifMessage>, InteractiveHeaderAttachment, ButtonsMessageHeader, HighlyStructuredFourRowTemplateTitle, HydratedFourRowTemplateTitle
A model class that represents a message holding a video inside
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe constants of this enumerated type describe the various sources from where a gif can come fromNested classes/interfaces inherited from interface it.auties.whatsapp.model.message.button.ButtonsMessageHeader
ButtonsMessageHeader.TypeNested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.hsm.HighlyStructuredFourRowTemplateTitle
HighlyStructuredFourRowTemplateTitle.TypeNested classes/interfaces inherited from interface it.auties.whatsapp.model.button.template.hydrated.HydratedFourRowTemplateTitle
HydratedFourRowTemplateTitle.TypeNested classes/interfaces inherited from interface it.auties.whatsapp.model.button.interactive.InteractiveHeaderAttachment
InteractiveHeaderAttachment.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate final ContextInfoprivate final Integerprivate final VideoOrGifMessage.Attributionprivate final booleanprivate final Integerprivate final List<InteractiveLocationAnnotation> private Stringprivate byte[]private byte[]private longprivate byte[]private Longprivate Stringprivate final Stringprivate final Stringprivate final byte[]private final byte[]private final Stringprivate final byte[]private final byte[]private final booleanprivate final Integer -
Constructor Summary
ConstructorsConstructorDescriptionVideoOrGifMessage(String mediaUrl, String mimetype, byte[] mediaSha256, Long mediaSize, Integer duration, byte[] mediaKey, String caption, boolean gifPlayback, Integer height, Integer width, byte[] mediaEncryptedSha256, List<InteractiveLocationAnnotation> interactiveAnnotations, String mediaDirectPath, long mediaKeyTimestampSeconds, byte[] thumbnail, ContextInfo contextInfo, byte[] streamingSidecar, VideoOrGifMessage.Attribution gifAttribution, boolean viewOnce, String thumbnailDirectPath, byte[] thumbnailSha256, byte[] thumbnailEncSha256, String staticUrl) -
Method Summary
Modifier and TypeMethodDescriptioncaption()duration()(package private) static VideoOrGifMessagegifBuilder(byte[] media, String mimeType, String caption, VideoOrGifMessage.Attribution gifAttribution, byte[] thumbnail, ContextInfo contextInfo) booleanheight()Return the type of this titleprivate static booleanReturns the direct path to the mediaOptional<byte[]> Returns the sha256 of this encrypted mediaOptional<byte[]> mediaKey()Returns the key of this mediaReturns the timestampSeconds forMutableAttachmentProvider.mediaKey()Returns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH, forMutableAttachmentProvider.mediaKey()Optional<byte[]> Returns the sha256 of this mediaReturns the size of this mediaReturns the media type of the media that this object wrapsmediaUrl()Returns the url to the mediamimetype()setMediaDirectPath(String mediaDirectPath) Sets the direct path of this providersetMediaEncryptedSha256(byte[] bytes) Sets the sha256 of the encrypted media in this providersetMediaKey(byte[] bytes) Sets the media key of this providersetMediaKeyTimestamp(Long timestamp) Sets the timestamp of the media keysetMediaSha256(byte[] bytes) Sets the sha256 of the media in this providersetMediaSize(long mediaSize) Sets the size of this mediasetMediaUrl(String mediaUrl) Sets the media url of this providerOptional<byte[]> Optional<byte[]> Optional<byte[]> Optional<byte[]> Return the type of this title(package private) static VideoOrGifMessagevideoBuilder(byte[] media, String mimeType, String caption, byte[] thumbnail, ContextInfo contextInfo) booleanviewOnce()width()Methods inherited from class it.auties.whatsapp.model.message.model.reserved.ExtendedMediaMessage
decodedMedia, handle, setDecodedMedia, setHandleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.auties.whatsapp.model.message.model.MediaMessage
attachmentType, category, type
-
Field Details
-
mediaUrl
-
mimetype
-
mediaSha256
private byte[] mediaSha256 -
mediaSize
-
duration
-
mediaKey
private byte[] mediaKey -
caption
-
gifPlayback
private final boolean gifPlayback -
height
-
width
-
mediaEncryptedSha256
private byte[] mediaEncryptedSha256 -
interactiveAnnotations
-
mediaDirectPath
-
mediaKeyTimestampSeconds
private long mediaKeyTimestampSeconds -
thumbnail
private final byte[] thumbnail -
contextInfo
-
streamingSidecar
private final byte[] streamingSidecar -
gifAttribution
-
viewOnce
private final boolean viewOnce -
thumbnailDirectPath
-
thumbnailSha256
private final byte[] thumbnailSha256 -
thumbnailEncSha256
private final byte[] thumbnailEncSha256 -
staticUrl
-
-
Constructor Details
-
VideoOrGifMessage
public VideoOrGifMessage(String mediaUrl, String mimetype, byte[] mediaSha256, Long mediaSize, Integer duration, byte[] mediaKey, String caption, boolean gifPlayback, Integer height, Integer width, byte[] mediaEncryptedSha256, List<InteractiveLocationAnnotation> interactiveAnnotations, String mediaDirectPath, long mediaKeyTimestampSeconds, byte[] thumbnail, ContextInfo contextInfo, byte[] streamingSidecar, VideoOrGifMessage.Attribution gifAttribution, boolean viewOnce, String thumbnailDirectPath, byte[] thumbnailSha256, byte[] thumbnailEncSha256, String staticUrl)
-
-
Method Details
-
videoBuilder
static VideoOrGifMessage videoBuilder(byte[] media, String mimeType, String caption, byte[] thumbnail, ContextInfo contextInfo) -
gifBuilder
static VideoOrGifMessage gifBuilder(byte[] media, String mimeType, String caption, VideoOrGifMessage.Attribution gifAttribution, byte[] thumbnail, ContextInfo contextInfo) -
isNotGif
-
mediaUrl
Description copied from interface:MutableAttachmentProviderReturns the url to the media- Specified by:
mediaUrlin interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- a nullable String
-
setMediaUrl
Description copied from interface:MutableAttachmentProviderSets the media url of this provider- Specified by:
setMediaUrlin interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- the same provider
-
mediaDirectPath
Description copied from interface:MutableAttachmentProviderReturns the direct path to the media- Specified by:
mediaDirectPathin interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- a nullable String
-
setMediaDirectPath
Description copied from interface:MutableAttachmentProviderSets the direct path of this provider- Specified by:
setMediaDirectPathin interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- the same provider
-
mediaKey
Description copied from interface:MutableAttachmentProviderReturns the key of this media- Specified by:
mediaKeyin interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- a non-null array of bytes
-
setMediaKey
Description copied from interface:MutableAttachmentProviderSets the media key of this provider- Specified by:
setMediaKeyin interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- the same provider
-
setMediaKeyTimestamp
Description copied from interface:MutableAttachmentProviderSets the timestamp of the media key- Specified by:
setMediaKeyTimestampin interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- the same provider
-
mediaSha256
Description copied from interface:MutableAttachmentProviderReturns the sha256 of this media- Specified by:
mediaSha256in interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- a non-null array of bytes
-
setMediaSha256
Description copied from interface:MutableAttachmentProviderSets the sha256 of the media in this provider- Specified by:
setMediaSha256in interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- the same provider
-
mediaEncryptedSha256
Description copied from interface:MutableAttachmentProviderReturns the sha256 of this encrypted media- Specified by:
mediaEncryptedSha256in interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- a non-null array of bytes
-
setMediaEncryptedSha256
Description copied from interface:MutableAttachmentProviderSets the sha256 of the encrypted media in this provider- Specified by:
setMediaEncryptedSha256in interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- the same provider
-
mediaSize
Description copied from interface:MutableAttachmentProviderReturns the size of this media- Specified by:
mediaSizein interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- a long
-
mediaKeyTimestampSeconds
Description copied from interface:MediaMessageReturns the timestampSeconds, that is the seconds elapsed sinceInstant.EPOCH, forMutableAttachmentProvider.mediaKey()- Specified by:
mediaKeyTimestampSecondsin interfaceMediaMessage<VideoOrGifMessage>- Returns:
- an unsigned long
-
mediaKeyTimestamp
Description copied from interface:MediaMessageReturns the timestampSeconds forMutableAttachmentProvider.mediaKey()- Specified by:
mediaKeyTimestampin interfaceMediaMessage<VideoOrGifMessage>- Returns:
- a zoned date time
-
setMediaSize
Description copied from interface:MutableAttachmentProviderSets the size of this media- Specified by:
setMediaSizein interfaceMutableAttachmentProvider<VideoOrGifMessage>- Returns:
- a long
-
caption
-
height
-
width
-
gifPlayback
public boolean gifPlayback() -
mediaType
Description copied from interface:MediaMessageReturns the media type of the media that this object wraps- Specified by:
mediaTypein interfaceMediaMessage<VideoOrGifMessage>- Returns:
- a non-null
MediaMessageType
-
titleType
Description copied from interface:HighlyStructuredFourRowTemplateTitleReturn the type of this title- Specified by:
titleTypein interfaceHighlyStructuredFourRowTemplateTitle- Returns:
- a non-null type
-
hydratedTitleType
Description copied from interface:HydratedFourRowTemplateTitleReturn the type of this title- Specified by:
hydratedTitleTypein interfaceHydratedFourRowTemplateTitle- Returns:
- a non-null type
-
interactiveHeaderType
- Specified by:
interactiveHeaderTypein interfaceInteractiveHeaderAttachment
-
buttonHeaderType
- Specified by:
buttonHeaderTypein interfaceButtonsMessageHeader
-
contextInfo
- Specified by:
contextInfoin interfaceContextualMessage
-
mimetype
-
duration
-
interactiveAnnotations
-
thumbnail
-
streamingSidecar
-
gifAttribution
-
viewOnce
public boolean viewOnce() -
thumbnailDirectPath
-
thumbnailSha256
-
thumbnailEncSha256
-
staticUrl
-