AudioCard class
Card builder class that simplifies building Media cards.
- Extends
Constructors
Audio |
Creates a new Audio. |
Methods
autoloop(boolean) | Should the media source reproduction run in a loop |
autostart(boolean) | Should the media start automatically |
image(ICard |
Messaging supports all media formats: audio, video, images and thumbnails as well to optimize content download. |
media(ICard |
Media source for video, audio or animations |
shareable(boolean) | Should media be shareable |
subtitle(Text |
Subtitle appears just below Title field, differs from Title in font styling only |
text(Text |
Text field appears just below subtitle, differs from Subtitle in font styling only |
title(Text |
Title of the Card |
to |
Returns the JSON for the card |
value(any) | Supplementary parameter for this card. |
Constructor Details
AudioCard(Session)
Creates a new Audio.
new AudioCard(session?: Session)
Parameters
- session
- Session
(Optional) will be used to localize any text.
Method Details
autoloop(boolean)
Should the media source reproduction run in a loop
function autoloop(choice: boolean)
Parameters
- choice
-
boolean
Returns
this
autostart(boolean)
Should the media start automatically
function autostart(choice: boolean)
Parameters
- choice
-
boolean
Returns
this
image(ICardImage | IIsCardImage)
Messaging supports all media formats: audio, video, images and thumbnails as well to optimize content download.
function image(image: ICardImage | IIsCardImage)
Parameters
- image
Returns
this
media(ICardMediaUrl[])
Media source for video, audio or animations
function media(list: ICardMediaUrl[])
Parameters
- list
Returns
this
shareable(boolean)
Should media be shareable
function shareable(choice: boolean)
Parameters
- choice
-
boolean
Returns
this
subtitle(TextType, any[])
Subtitle appears just below Title field, differs from Title in font styling only
function subtitle(text: TextType, args: any[])
Parameters
- text
- TextType
- args
-
any[]
Returns
this
text(TextType, any[])
Text field appears just below subtitle, differs from Subtitle in font styling only
function text(text: TextType, args: any[])
Parameters
- text
- TextType
- args
-
any[]
Returns
this
title(TextType, any[])
Title of the Card
function title(text: TextType, args: any[])
Parameters
- text
- TextType
- args
-
any[]
Returns
this
toAttachment()
value(any)
Supplementary parameter for this card.
function value(param: any)
Parameters
- param
-
any
Returns
this