Open hteumeuleu opened 3 years ago
Outlook.com removes the controls attribute (as well as autoplay and any media specific attribute). So in order to launch an audio or video, you need to right click on the visible element and hit "Play" from the contextual menu of your browser. Which is… not ideal for marketing emails.
It's worth noting that Chrome/Edge's user-agent stylesheet applies display: none
to audio
with no controls:
audio:not([controls]) {
display: none !important;
}
So based on what browser the user views the email on, they may not see the audio element (and wouldn't be able to right-click and select play from the context menu).
A recent update seems to have added support for the
<video>
and<audio>
elements in Outlook.com (and the iOS and Android apps as well). But there are two things that prevent media to play correctly.1. Content Security Policy
Outlook.com has a strict Content Security Policy header set to the following:
What interests us here is the
media-src
part. This states that any media (audio or video) can only play in Outlook.com if it comes from one of the following domain or subdomain:I'm not sure it's possible for any third party user (like you and me) to have any media file hosted on any of those URLs. I was able to find an audio file hosted on
skype.com
to prove it works (https://swc.cdn.skype.com/assets/sounds/Skype_Call_Dialing.m4a). But this brings me to the second point.2. Controls
Outlook.com removes the
controls
attribute (as well asautoplay
and any media specific attribute). So in order to launch an audio or video, you need to right click on the visible element and hit "Play" from the contextual menu of your browser. Which is… not ideal for marketing emails.Here’s a full test email code:
In Outlook.com, you'll get two green zones corresponding to the size of the
<audio>
and<video>
element. But no fallback will show.In the Outlook app on Android, you'll get a giant play button. (But taping on it won't do anything.)
Conclusion
I'm not sure what's the intent from the Outlook team here. But I feel like I'd rather have it not support any
<video>
or<audio>
element like it used to (thus falling back to the native HTML fallback inside each element). Here it requires yet another hack for any emails that include video specific for Outlook.com (and the mobile apps) to hide the interactive elements and show another fallback instead.