Has anyone encountered this problem?
Videos uploaded to an ASP.NET MVC5 website from a browser on a Windows PC or from an Android phone play back fine in any browser, on Android and even Windows Mobile but are not visible on iPhone.
The gallery code looks something like:
<div id="link_@fileViewModel.ID" class="row gallery-media-file">
<a href="@Url.Action("GetVideoFile", "File", new {id = fileViewModel.ID})" type="video/mp4" title="@videoViewModel.Title" class="m-0">
<video class="img-responsive">
<source src="@Url.Action("GetVideoFile", "File", new {id = fileViewModel.ID})" type="video/mp4" />
</video>
</a>
The server is IIS8 and has Application Request Routing Cache installed to handle byte range segment size.
Video is stored in the backend DB and served with the following action:
public void GetVideoFile(Guid id)
{
var file = _fileProcessor.Get(id);
Response.ContentType = file.MimeType;
Response.BinaryWrite(file.Data);
}
Any ideas... I'm stumped?
EDIT:
Files are uploaded using Dropzone.js -> https://www.dropzonejs.com/
EDIT2:
I'm also using the blueimp gallery to display files but it turns out removing the attribute:
type="video/mp4"
from the anchor tag allows the video to play on iPhone.
Unfortunately, it does not show a still of the video though and also plays without sound. Additionally, when the type attribute is removed from the anchor tag, it stops playing in the gallery on desktop and android.
Ultimately, I may have to render the html conditionally according to the client but the volume and video image capture is still a problem.
The following has been some help, but still no joy: HTML5 Video tag not working in Safari , iPhone and iPad