Can I control the order of how MMS attachments are displayed?
FollowThe order of how MMS attachments are displayed on a handset can be controlled using a SMIL file. SMIL (Synchronized Multimedia Integration Language) is a presentation language that configures how an MMS message is displayed, and is similar to how HTML configures the display of information on a web page.
When included in an MMS message, the SMIL file becomes one of the objects within an MMS message, in addition to the text and other media files that are included (e.g. PNG, JPEG, GIF). If no SMIL file is added, Bandwidth will pass on the content of the message in the order received.
Note: SMIL files aren't supported on toll-free numbers. Even when a SMIL file is added to an MMS message on a local number, we can't guarantee that all of our downstream providers will honor the order you've requested to be presented on the receiver’s handset.
This is a sample of what a SMIL file would look like that specifies ordering an image BEFORE text:
<smil>
<body>
<par dur="5000ms">
<img src="bw_logo.png" region="Image" />
</par>
<par dur="5000ms">
<text src="content.txt" region="Text" />
</par>
</body>
</smil>
The request body would then look something like the following (scroll right to see the full sample):
{
"to" : "+1##########",
"from" : "+1##########",
"applicationId" : "YOUR_APP_ID",
"media" : ["https://messaging.bandwidth.com/api/v2/users/u-tqvdvvbbzwrkde3bhszab6a/media/test23.smil", "https://messaging.bandwidth.com/api/v2/users/u-tqvdvvbbzwrkde3bhszab6a/media/content3.txt","https://messaging.bandwidth.com/api/v2/users/u-tqvdvvbbzwrkde3bhszab6a/media/bw_logo.png"]
}
Important: When you upload a SMIL file to Bandwidth, please make sure that the content-type API header is set to application/smil. If you're hosting it yourself, GET requests to your public URL need to return a content-type of application/smil.
Questions? Please open a ticket with your Bandwidth Support Team or hit us up at (855) 864-7776!
Article is closed for comments.