1

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

  • Possibly due to codec or other video settings/characteristics - are you able to share an example video which does not play and people can check? – Mick Oct 01 '19 at 11:12
  • I'm not sure the video is the problem as the video can be downloaded if the controls are added. Plus uploading video from iPhone also does not seem to work. An example file though is: https://1drv.ms/v/s!Archpy3ZX-dIz5ATDCmoBrLAQCMn6A?e=W1zLcA – Billy Ray Valentine Oct 01 '19 at 14:05
  • 1
    That video plays from your OneDrive location so if the format is unchanged on your server it is not the video as you say. I am guessing you can't share a link to your site but you can debug the iOS playback to check console etc using Safari on a MAC if you have access: https://medium.com/@mattcroak718/debugging-your-iphone-mobile-web-app-using-safari-development-tools-71240657c487 – Mick Oct 02 '19 at 10:48
  • Thanks @Mick. Unfortunately I don't have a Mac. I think I'm getting closer to a solution though, updating the question now. – Billy Ray Valentine Oct 02 '19 at 11:35
  • And yes I can't share the video link as you would need to log into the site to view (which you could do if you wanted to). – Billy Ray Valentine Oct 02 '19 at 12:00

0 Answers0