SharePoint MP4 not working on IOS

SharePoint

I had an issue previously where uploaded .mp4 video in SharePoint will not playing on iPhone and iPad

What to do


to do this you have to do two steps:

  1. Configure the BlobCache in web.config
  2. Configure IIS to provide a MIME type for .mp4 files at server level. 

Solution


Step 1: Configure the BlobCache in web.config

You turn on Blob Cache by updating the web.config files for your web application(s). in your web.config already you will have entry looks like:

<BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" enabled="false" />

Enable it to be look like the next XML by setting the enabled attribute to be true enabled="true"  and make sure you have enough space at your server to store the cache, the folder will created automatically no need to create a folder at your c: drive. 

<BlobCache location="C:\BlobCache\14" path="\.(gif|jpg|jpeg|jpe|jfif|bmp|dib|tif|tiff|themedbmp|themedcss|themedgif|themedjpg|themedpng|ico|png|wdp|hdp|css|js|asf|avi|flv|m4v|mov|mp3|mp4|mpeg|mpg|rm|rmvb|wma|wmv|ogg|ogv|oga|webm|xap)$" maxSize="10" enabled="true" />

Step 2: to configure the MIME Type you MUST set the MIME Type at Server Level not Web Site Level, The screen capture below shows the MIME type being set at the Server level in IIS

Adding the MIME type at the site level with BlobCache will results in the MP4 being displayed as encoded text.

I tried many solution on internet but when i applied the BlobCache the video still displayed as encoded text, i checked the ULS log and found the following:

No configured MIME type for requested file

C:\BLOBCACHE\14\465937878\PHZPZVZDLKS1UF0CDDRVCG\MEDIAFILES\DESIGN_TECHNOLOGY_GRADE_5_MEDIA_FILES_\MEDIA 2.1-DchGOiLf8kC0HC++ReHVvA.MP4'

Cause:  The cause is that SharePoint looks to the Server Level for the MIME Map. PublishingHttpModule handles the Authorize request, and looks up the mime map during this process.


The mime map reads the information from the machine level, not the site level.

Solution:  Set the MIME type at the Server Level. 

Clear the browser cache and test again, Cheers 🙂


2 comments
Leave a Reply

Your email address will not be published. Required fields are marked *