HTML5 video not playing in native iOS email client (2015)

怎甘沉沦 提交于 2019-12-10 10:55:12

问题


I am trying to send an HTML email with a video embedded in the code and view it on the native email app for iOS devices. The native iOS mail app has supported HTML5 video elements and I have tested this on many occasions in the past few years.

Last week after sending a few video emails, I noticed that the media player in the native app would load, render the initial frame of the video, but not play the video. I've gone through the iOS software release history to see if there was anything that may have affected this behavior but was unsuccessful.

Below is the email

<html>
 <head>
  <title>TEST</title>
  <style></style>
 </head>
<body>
 <div id="html5-video">
  <p>THIS IS A HTML5 VIDEO</p>
  <video controls>
   <source src="http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4" type="video/mp4">
   <p>Your browser does not support H.264/MP4.</p>
  </video>
 </div>
</body>
</html>

Additional notes: - video plays fine in other supported email environments - iOS supports the H.264/MP4 video file format - the issue started occurring sometime in March or April

Any help pointing me in the right direction will be greatly appreciated :)


回答1:


You have a slight inaccuracy in your question.

iOS supports the file format of MP4

Almost! It actually supports some MP4 files, but not all of them.

You need to closely follow the guidance that Apple issue if you want the video to play - they protect their brand by refusing to attempt to play videos that could look poor on the device...

In particular, they want you to adhere to certain conditions for bit rates, sizes, and even request that your HTTP server supports byte-range requests.

If you meet these conditions - then the video should play.



来源:https://stackoverflow.com/questions/29926248/html5-video-not-playing-in-native-ios-email-client-2015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!