You can embed short videos in the body of a traditional rich inbox message. For richer video content, you can use video templates for the rich message.
Embed video in the message body
Following is the example of an embedded short video in the body of a traditional rich inbox message. It uses two sets of parameters depending on the video file format:
video controls
andposter
parameters for a video thumbnail, in this example – a .gif filesource src
andtype
for.webm
,.ogv
,.mp4
, and.3gp
files
<html>
<head>
<title>Watch a video</title>
</head>
<body>
<video controls="true" poster="https://archive.org/download/WebmVp8Vorbis/webmvp8.gif" width="320">
<source src="http://techslides.com/demos/sample-videos/small.webm" type="video/webm" />
<source src="http://techslides.com/demos/sample-videos/small.ogv" type="video/ogg" />
<source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4" />
<source src="http://techslides.com/demos/sample-videos/small.3gp" type="video/3gp" />
Your browser doesn't support HTML5 video tag.</video>
</body>
</html>
Note: This example works only for small videos, as they get downloaded in real time before being displayed on the browser.
Use a video template for rich messages
You can also use a video template for rich messages. This displays the video inline in the inbox.
- In the Actions menu, select Show inbox notification.
- Select Video template.
- Fill up the details of the video in the Content information section.
Note: With the video template, the browser cannot choose a supported video format. It plays the video you send. Make sure that the video you send is compatible with the devices that receive it. The acceptable file extensions are .webm
, .ogg
, .mp4
, and .3gp
.