​​

HTML5 video does not work on mobile browsers for authentication

I use a standard video tag, for example <video src="test.mp4" controls>​​</video>. I work in a SharePoint 2013 environment with NTLM authentication with basic authentication as rollback. The video tag works seamlessly in all desktop browsers that support HTML5 video.

In mobile browsers, the video tag cannot be executed as soon as I authenticate the site. Video is simply static public content that is served by IIS 8 and is not part of SharePoint. The only exception so far is Firefox on android, which works without problems. I uninstalled NTLM auth and switched to basic auth with only the same results.

I have tested so far:

  • iPad iOS 8 - Safari, Chrome
  • Android K and L - Chrome, Firefox
  • Windows Phone 8.1 - IE

The video works until I am authenticated on the host where the video is located. So, if I am in host1 with markup pointing to the video on host2, the video will work until I authenticate to host2.

The video also works great if I go through forms-based authentication. In my case, I am using Microsoft TMG.

I got to Android Chrome: first it will send a range request with 0-1 bytes, as expected in Chrome as a user agent. In the absence of authentication, he will request the rest of the video using stagefright as a user agent. During authentication, it does not send anything and simply cannot play the video. ADB logcat returns this when this happens:

E/StagefrightMetadataRetriever (183): 'snipped-video-url'.

E/MediaResourceGetter (11682):

E/MediaResourceGetter (11682): java.lang.RuntimeException: setDataSource: status = 0x80000000

E/MediaResourceGetter (11682): at android.media.MediaMetadataRetriever._setDataSource ( )

E/MediaResourceGetter (11682): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:105)

E/MediaResourceGetter (11682): at org.chromium.content.browser.MediaResourceGetter.configure(MediaResourceGetter.java:417)

E/MediaResourceGetter (11682): org.chromium.content.browser.MediaResourceGetter.configure(MediaResourceGetter.java:259)

E/MediaResourceGetter (11682): at org.chromium.content.browser.MediaResourceGetter.extract(MediaResourceGetter.java:153)

E/MediaResourceGetter (11682): at org.chromium.content.browser.MediaResourceGetter.extractMediaMetadata(MediaResourceGetter.java:125)

E/MediaResourceGetter (11682):

I/MediaFocusControl (744): AudioFocusAudioFocus() android.media.AudioManager @2ff8d914org.chromium.media.MediaPlayerListener @23b9af5d

D/MediaPlayer (11682): ,

I/AwesomePlayer (183): setDataSource_l()

, Chrome/Safari, IE, , . ? , , .

+4
1

, (E/StagefrightMetadataRetriever (183): "snipped-video-url".) , .

<uses-permission android:name="android.permission.INTERNET" />

Error

After the error

0

All Articles